Skip to content

[tizen_rpc_port] Update RpcPort to support TIDL protocol version 2#1070

Open
pjh9216 wants to merge 2 commits into
flutter-tizen:masterfrom
pjh9216:support_v2
Open

[tizen_rpc_port] Update RpcPort to support TIDL protocol version 2#1070
pjh9216 wants to merge 2 commits into
flutter-tizen:masterfrom
pjh9216:support_v2

Conversation

@pjh9216

@pjh9216 pjh9216 commented Jul 16, 2026

Copy link
Copy Markdown

Add low level Parcel primitives to support the TIDL protocol version 2 Dart generator under packages/tizen_rpc_port.

Implement the dataSize, reserve, and reader getter/setter properties in the Parcel class using Dart FFI to map them to the native C APIs:

  • rpc_port_parcel_get_reader
  • rpc_port_parcel_set_reader
  • rpc_port_parcel_get_data_size
  • rpc_port_parcel_set_data_size
  • rpc_port_parcel_reserve

Add low level Parcel primitives to support the Dart protocol version 2
generator under packages/tizen_rpc_port.

Implement the dataSize, reserve, and reader getter/setter properties
in the Parcel class using Dart FFI to map them to the native C APIs:
- rpc_port_parcel_get_reader
- rpc_port_parcel_set_reader
- rpc_port_parcel_get_data_size
- rpc_port_parcel_set_data_size
- rpc_port_parcel_reserve

Co-Authored-By: Gemini CLI <gemini-cli@google.com>
Signed-off-by: jh9216.park <jh9216.park@samsung.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds properties and methods to the Parcel class in packages/tizen_rpc_port/lib/src/parcel.dart to manage reader position, data size, and capacity reservation, along with their corresponding FFI bindings. Feedback suggests adding non-negative validation checks (RangeError.checkNotNegative) to the reader and dataSize setters and the reserve method to prevent passing negative values to the native API. Additionally, it is recommended to use rpc_port_parcel_h instead of Pointer<Void> in the FFI signatures to improve type safety.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/tizen_rpc_port/lib/src/parcel.dart
Comment thread packages/tizen_rpc_port/lib/src/parcel.dart
Comment thread packages/tizen_rpc_port/lib/src/parcel.dart
Comment thread packages/tizen_rpc_port/lib/src/parcel.dart Outdated
@JSUYA
JSUYA self-requested a review July 16, 2026 00:32

@JSUYA JSUYA left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check gemini's review comments. If you think they are invalid, please resolve them.

And

Please modify the format using Dart Formatter.

https://github.com/flutter-tizen/plugins/actions/runs/29460673863/job/87506437916?pr=1070

2026-07-16T00:35:55.7848891Z Running command: "dart format example/client/integration_test/tizen_rpc_port_test.dart example/client/lib/main.dart example/client/lib/message_client.dart example/client/test_driver/integration_test.dart example/server/integration_test/tizen_rpc_port_test.dart example/server/lib/main.dart example/server/lib/message_server.dart example/server/test_driver/integration_test.dart lib/src/parcel.dart lib/src/port.dart lib/src/proxy_base.dart lib/src/stub_base.dart lib/tizen_rpc_port.dart" in /home/runner/work/plugins/plugins/packages/tizen_rpc_port

}
}

final DynamicLibrary _libRpcPort = DynamicLibrary.open('librpc-port.so.1');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these APIs have a dependency on the Tizen version? Are they only used in Tizen 11?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It is dependent on tizen version. Since Tizen 10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these APIs public open ACR APIs?
If this API is changed in librpc-port.so in Tizen 11.0 or 10.1, platform compatibility cannot be guaranteed to users.
At the very least, there needs to be a way to verify that these APIs are managed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is internal API but It will not be changed to support backward compatibility.
The native APIs is already working in many apps using TIDL.

Add RangeError.checkNotNegative checks to Parcel setters and methods to
prevent negative values from being passed to native unsigned APIs.

Use rpc_port_parcel_h handle type instead of Pointer<Void> in the FFI
signatures to improve type safety and consistency.

Run dart format on all specified package files to adhere to formatting
standards.

Co-Authored-By: Gemini CLI <gemini-cli@google.com>
Signed-off-by: jh9216.park <jh9216.park@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants