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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/tizen_rpc_port/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.1.5

* Update code format.
* Resolved issue with failure to receive events in multiple proxies

## 0.1.4

Expand Down
2 changes: 1 addition & 1 deletion packages/tizen_rpc_port/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The generated source files (`message_client.dart` and `message_server.dart`) dep

```yaml
depenedencies:
tizen_rpc_port: ^0.1.4
tizen_rpc_port: ^0.1.5
```

Assuming that the name of the interface defined in your interface file is `Message`, the client must first call its `connect` method to connect to the server before making any remote invocation.
Expand Down
2 changes: 1 addition & 1 deletion packages/tizen_rpc_port/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: tizen_rpc_port
description: Tizen RPC Port APIs. Used to make remote procedure calls between Tizen apps.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/tizen_rpc_port
version: 0.1.4
version: 0.1.5

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
38 changes: 27 additions & 11 deletions packages/tizen_rpc_port/tizen/src/tizen_rpc_port_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,18 @@ class RpcProxyStreamHandler : public FlStreamHandler {
rpc_port_proxy_h handle = nullptr;
std::string appid, port_name;
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int64_t&>(handle)) ||
!GetValueFromEncodableMap(args, "appid", appid) ||
reinterpret_cast<int64_t&>(handle))) {
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int32_t&>(handle))) {
return std::make_unique<FlStreamHandlerError>(
"Invalid arguments", "No handle provided.", nullptr);
}
}

if (!GetValueFromEncodableMap(args, "appid", appid) ||
!GetValueFromEncodableMap(args, "portName", port_name)) {
return std::make_unique<FlStreamHandlerError>(
"Invalid arguments", "No handle, appid, or portName provided.",
nullptr);
"Invalid arguments", "No appid, or portName provided.", nullptr);
}

LOG_DEBUG("Called OnListenInternal handle %p", handle);
Expand Down Expand Up @@ -100,8 +106,11 @@ class RpcStubStreamHandler : public FlStreamHandler {
rpc_port_stub_h handle = nullptr;
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int64_t&>(handle))) {
return std::make_unique<FlStreamHandlerError>(
"Invalid arguments", "No handle provided.", nullptr);
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int32_t&>(handle))) {
return std::make_unique<FlStreamHandlerError>(
"Invalid arguments", "No handle provided.", nullptr);
}
}

auto ret = RpcPortStubManager::Listen(handle);
Expand Down Expand Up @@ -161,13 +170,20 @@ class TizenRpcPortPlugin : public flutter::Plugin {
result->Error("Invalid arguments", "The argument must be a map.");
return;
}

rpc_port_proxy_h handle = nullptr;
std::string appid, port_name;
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int64_t&>(handle)) ||
!GetValueFromEncodableMap(args, "portName", port_name)) {
result->Error("Invalid arguments",
"No handle, appid, or portName provided.");
reinterpret_cast<int64_t&>(handle))) {
if (!GetValueFromEncodableMap(args, "handle",
reinterpret_cast<int32_t&>(handle))) {
result->Error("Invalid arguments", "No handle provided.");
return;
}
}

std::string appid, port_name;
if (!GetValueFromEncodableMap(args, "portName", port_name)) {
result->Error("Invalid arguments", "No portName provided.");
return;
}

Expand Down