[tizen_rpc_port] Update RpcPort to support TIDL protocol version 2#1070
[tizen_rpc_port] Update RpcPort to support TIDL protocol version 2#1070pjh9216 wants to merge 2 commits into
Conversation
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>
There was a problem hiding this comment.
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.
JSUYA
left a comment
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
Do these APIs have a dependency on the Tizen version? Are they only used in Tizen 11?
There was a problem hiding this comment.
Yes, It is dependent on tizen version. Since Tizen 10
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>
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: