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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3,359 changes: 2,014 additions & 1,345 deletions lib/src/bindings/10.0/generated_bindings_accounts_svc.dart

Large diffs are not rendered by default.

243 changes: 162 additions & 81 deletions lib/src/bindings/10.0/generated_bindings_appcore_agent.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// {@category 10.0/tizen}
library tizen_interop_10_0.appcore_agent;

// 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.
Expand All @@ -11,6 +14,7 @@ import 'generated_bindings_capi_appfw_app_common.dart' as app_common;
import 'generated_bindings_capi_appfw_app_control.dart' as app_control;

/// Dart bindings for Tizen appcore-agent APIs.
/// {@category 10.0/tizen}
class Tizen100AppcoreAgent {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
Expand All @@ -26,21 +30,37 @@ class Tizen100AppcoreAgent {
lookup)
: _lookup = lookup;

/// @brief Adds the system event handler.
/// @since_tizen 2.3
/// @remarks The service application can handle low memory event, low battery event, language setting changed event and region format changed event.
/// @remarks The @a handler should be released using service_app_remove_event_handler().
/// @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
/// @par Example
/// @code
/// Adds the system event handler.
///
/// **Since Tizen:**
/// - 2.3
///
/// **Remarks:**
/// - The service application can handle low memory event, low battery event, language setting changed event and region format changed event.
/// - The `handler` should be released using service_app_remove_event_handler().
///
/// **Parameters:**
/// - `handler` (out): The event handler
/// - `event_type` (in): The system event type
/// - `callback` (in): The callback function
/// - `user_data` (in): The user data to be passed to the callback function
///
/// **Returns:**
/// - `0` on success, otherwise a negative error value
///
/// **Return values:**
/// - `APP_ERROR_NONE`: Successful
/// - `APP_ERROR_INVALID_PARAMETER`: Invalid parameter
/// - `APP_ERROR_OUT_OF_MEMORY`: Out of memory
///
/// **See also:**
/// - `app_event_type_e`
/// - `app_event_cb()`
/// - `service_app_remove_event_handler()`
///
/// **Example:**
///
/// ```
/// #include <service_app.h>
///
/// static void
Expand All @@ -59,10 +79,7 @@ class Tizen100AppcoreAgent {
///
/// return 0;
/// }
/// @endcode
/// @see app_event_type_e
/// @see app_event_cb()
/// @see service_app_remove_event_handler()
/// ```
int service_app_add_event_handler(
ffi.Pointer<app_common.app_event_handler_h> handler,
int event_type,
Expand All @@ -89,14 +106,23 @@ class Tizen100AppcoreAgent {
int Function(ffi.Pointer<app_common.app_event_handler_h>, int,
app_common.app_event_cb, ffi.Pointer<ffi.Void>)>();

/// @brief Removes registered event handler.
/// @since_tizen 2.3
/// @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()
/// Removes registered event handler.
///
/// **Since Tizen:**
/// - 2.3
///
/// **Parameters:**
/// - `event_handler` (in): The event handler
///
/// **Returns:**
/// - `0` on success, otherwise a negative error value
///
/// **Return values:**
/// - `APP_ERROR_NONE`: Successful
/// - `APP_ERROR_INVALID_PARAMETER`: Invalid parameter
///
/// **See also:**
/// - `service_app_add_event_handler()`
int service_app_remove_event_handler(
app_common.app_event_handler_h event_handler,
) {
Expand All @@ -112,25 +138,34 @@ class Tizen100AppcoreAgent {
_service_app_remove_event_handlerPtr
.asFunction<int Function(app_common.app_event_handler_h)>();

/// @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 2.3
/// @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
/// Runs the main loop of the application until service_app_exit() is called.
///
/// 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:**
/// - 2.3
///
/// **Parameters:**
/// - `argc` (in): The argument count
/// - `argv` (in): The argument vector
/// - `callback` (in): The set of callback functions to handle application events
/// - `user_data` (in): The user data to be passed to the callback functions
///
/// **Returns:**
/// - `0` on success, otherwise a negative error value.
///
/// **Return values:**
/// - `APP_ERROR_NONE`: Successful
/// - `APP_ERROR_INVALID_PARAMETER`: Invalid parameter
/// - `APP_ERROR_INVALID_CONTEXT`: The application is launched illegally, not launched by the launch system.
/// - `APP_ERROR_ALREADY_RUNNING`: The main loop has already started
///
/// **See also:**
/// - `service_app_create_cb()`
/// - `service_app_terminate_cb()`
/// - `service_app_control_cb()`
/// - `service_app_exit()`
/// - `service_app_lifecycle_callback_s`
int service_app_main(
int argc,
ffi.Pointer<ffi.Pointer<ffi.Char>> argv,
Expand Down Expand Up @@ -159,11 +194,16 @@ class Tizen100AppcoreAgent {
ffi.Pointer<service_app_lifecycle_callback_s>,
ffi.Pointer<ffi.Void>)>();

/// @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 2.3
/// @see service_app_main()
/// @see service_app_terminate_cb()
/// Exits the main loop of the application.
///
/// The main loop of the application stops and service_app_terminate_cb() is invoked.
///
/// **Since Tizen:**
/// - 2.3
///
/// **See also:**
/// - `service_app_main()`
/// - `service_app_terminate_cb()`
void service_app_exit() {
return _service_app_exit();
}
Expand All @@ -174,13 +214,19 @@ class Tizen100AppcoreAgent {
_service_app_exitPtr.asFunction<void Function()>();
}

/// @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 2.3
/// @see service_app_main()
/// @see service_app_create_cb()
/// @see service_app_terminate_cb()
/// @see service_app_control_cb()
/// The structure type containing the set of callback functions for handling application events.
///
/// It is one of the input parameters of the service_app_efl_main() function.
///
/// **Since Tizen:**
/// - 2.3
///
/// **See also:**
/// - `service_app_main()`
/// - `service_app_create_cb()`
/// - `service_app_terminate_cb()`
/// - `service_app_control_cb()`
/// @nodoc
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;
Expand All @@ -192,49 +238,82 @@ final class service_app_lifecycle_callback_s extends ffi.Struct {
external service_app_control_cb app_control;
}

/// @brief Called at the start of the agent application.
/// @since_tizen 2.3
/// @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
/// Called at the start of the agent application.
///
/// **Since Tizen:**
/// - 2.3
///
/// **Parameters:**
/// - `user_data` (in): The user data passed from the callback registration function
///
/// **Returns:**
/// - `true` on success, otherwise `false`
///
/// **Preconditions:**
/// - service_app_main() will invoke this callback function.
///
/// **See also:**
/// - `service_app_main()`
/// - `service_app_lifecycle_callback_s`
/// @nodoc
typedef service_app_create_cb
= ffi.Pointer<ffi.NativeFunction<service_app_create_cbFunction>>;
/// @nodoc
typedef service_app_create_cbFunction = ffi.Bool Function(
ffi.Pointer<ffi.Void> user_data);
/// @nodoc
typedef Dartservice_app_create_cbFunction = bool Function(
ffi.Pointer<ffi.Void> user_data);

/// @brief Called once after the main loop of the agent application exits.
/// @since_tizen 2.3
/// @param[in] user_data The user data passed from the callback registration function
/// @see service_app_main()
/// @see #service_app_lifecycle_callback_s
/// Called once after the main loop of the agent application exits.
///
/// **Since Tizen:**
/// - 2.3
///
/// **Parameters:**
/// - `user_data` (in): The user data passed from the callback registration function
///
/// **See also:**
/// - `service_app_main()`
/// - `service_app_lifecycle_callback_s`
/// @nodoc
typedef service_app_terminate_cb
= ffi.Pointer<ffi.NativeFunction<service_app_terminate_cbFunction>>;
/// @nodoc
typedef service_app_terminate_cbFunction = ffi.Void Function(
ffi.Pointer<ffi.Void> user_data);
/// @nodoc
typedef Dartservice_app_terminate_cbFunction = void Function(
ffi.Pointer<ffi.Void> user_data);

/// @brief Called when another application sends the launch request to the agent application.
/// @since_tizen 2.3
/// @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
/// Called when another application sends the launch request to the agent application.
///
/// **Since Tizen:**
/// - 2.3
///
/// **Parameters:**
/// - `app_control` (in): The handle to the app_control
/// - `user_data` (in): The user data passed from the callback registration function
///
/// **See also:**
/// - `service_app_main()`
/// - `service_app_lifecycle_callback_s`
/// - `CAPI_APP_CONTROL_MODULE` API
/// @nodoc
typedef service_app_control_cb
= ffi.Pointer<ffi.NativeFunction<service_app_control_cbFunction>>;
/// @nodoc
typedef service_app_control_cbFunction = ffi.Void Function(
app_control.app_control_h app_control, ffi.Pointer<ffi.Void> user_data);
/// @nodoc
typedef Dartservice_app_control_cbFunction = void Function(
app_control.app_control_h app_control, ffi.Pointer<ffi.Void> user_data);

/// @brief Enumeration for system events.
/// @since_tizen 2.3
/// Enumeration for system events.
///
/// **Since Tizen:**
/// - 2.3
/// @nodoc
abstract class _app_event_type_e {
/// < The low memory event
static const int APP_EVENT_LOW_MEMORY = 0;
Expand All @@ -252,7 +331,9 @@ abstract class _app_event_type_e {
static const int APP_EVENT_REGION_FORMAT_CHANGED = 4;

/// < The suspended state changed event of the application (since 2.4)
/// @see app_event_get_suspended_state()
///
/// **See also:**
/// - `app_event_get_suspended_state()`
static const int APP_EVENT_SUSPENDED_STATE_CHANGED = 5;

/// < The update requested event (Since 3.0)
Expand Down
Loading
Loading