Skip to content

Commit b755167

Browse files
authored
[tizen_rpc_port] Update package version to 0.1.5 (#910)
1 parent 6979ce0 commit b755167

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

packages/tizen_rpc_port/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## NEXT
1+
## 0.1.5
22

33
* Update code format.
4+
* Resolved issue with failure to receive events in multiple proxies
45

56
## 0.1.4
67

packages/tizen_rpc_port/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The generated source files (`message_client.dart` and `message_server.dart`) dep
2121

2222
```yaml
2323
depenedencies:
24-
tizen_rpc_port: ^0.1.4
24+
tizen_rpc_port: ^0.1.5
2525
```
2626
2727
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.

packages/tizen_rpc_port/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: tizen_rpc_port
22
description: Tizen RPC Port APIs. Used to make remote procedure calls between Tizen apps.
33
homepage: https://github.com/flutter-tizen/plugins
44
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/tizen_rpc_port
5-
version: 0.1.4
5+
version: 0.1.5
66

77
environment:
88
sdk: ">=3.1.0 <4.0.0"

packages/tizen_rpc_port/tizen/src/tizen_rpc_port_plugin.cc

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,18 @@ class RpcProxyStreamHandler : public FlStreamHandler {
6161
rpc_port_proxy_h handle = nullptr;
6262
std::string appid, port_name;
6363
if (!GetValueFromEncodableMap(args, "handle",
64-
reinterpret_cast<int64_t&>(handle)) ||
65-
!GetValueFromEncodableMap(args, "appid", appid) ||
64+
reinterpret_cast<int64_t&>(handle))) {
65+
if (!GetValueFromEncodableMap(args, "handle",
66+
reinterpret_cast<int32_t&>(handle))) {
67+
return std::make_unique<FlStreamHandlerError>(
68+
"Invalid arguments", "No handle provided.", nullptr);
69+
}
70+
}
71+
72+
if (!GetValueFromEncodableMap(args, "appid", appid) ||
6673
!GetValueFromEncodableMap(args, "portName", port_name)) {
6774
return std::make_unique<FlStreamHandlerError>(
68-
"Invalid arguments", "No handle, appid, or portName provided.",
69-
nullptr);
75+
"Invalid arguments", "No appid, or portName provided.", nullptr);
7076
}
7177

7278
LOG_DEBUG("Called OnListenInternal handle %p", handle);
@@ -100,8 +106,11 @@ class RpcStubStreamHandler : public FlStreamHandler {
100106
rpc_port_stub_h handle = nullptr;
101107
if (!GetValueFromEncodableMap(args, "handle",
102108
reinterpret_cast<int64_t&>(handle))) {
103-
return std::make_unique<FlStreamHandlerError>(
104-
"Invalid arguments", "No handle provided.", nullptr);
109+
if (!GetValueFromEncodableMap(args, "handle",
110+
reinterpret_cast<int32_t&>(handle))) {
111+
return std::make_unique<FlStreamHandlerError>(
112+
"Invalid arguments", "No handle provided.", nullptr);
113+
}
105114
}
106115

107116
auto ret = RpcPortStubManager::Listen(handle);
@@ -161,13 +170,20 @@ class TizenRpcPortPlugin : public flutter::Plugin {
161170
result->Error("Invalid arguments", "The argument must be a map.");
162171
return;
163172
}
173+
164174
rpc_port_proxy_h handle = nullptr;
165-
std::string appid, port_name;
166175
if (!GetValueFromEncodableMap(args, "handle",
167-
reinterpret_cast<int64_t&>(handle)) ||
168-
!GetValueFromEncodableMap(args, "portName", port_name)) {
169-
result->Error("Invalid arguments",
170-
"No handle, appid, or portName provided.");
176+
reinterpret_cast<int64_t&>(handle))) {
177+
if (!GetValueFromEncodableMap(args, "handle",
178+
reinterpret_cast<int32_t&>(handle))) {
179+
result->Error("Invalid arguments", "No handle provided.");
180+
return;
181+
}
182+
}
183+
184+
std::string appid, port_name;
185+
if (!GetValueFromEncodableMap(args, "portName", port_name)) {
186+
result->Error("Invalid arguments", "No portName provided.");
171187
return;
172188
}
173189

0 commit comments

Comments
 (0)