Lines Matching refs:packet
40 [this] (const std::string &networkId, NetPacket &packet) {
41 this->OnStartCooperate(networkId, packet);}},
43 [this] (const std::string &networkId, NetPacket &packet) {
44 this->OnStopCooperate(networkId, packet);}},
46 [this] (const std::string &networkId, NetPacket &packet) {
47 this->OnComeBack(networkId, packet);}},
49 [this] (const std::string &networkId, NetPacket &packet) {
50 this->OnRelayCooperate(networkId, packet);}},
52 [this] (const std::string &networkId, NetPacket &packet) {
53 this->OnRelayCooperateFinish(networkId, packet);}},
55 [this] (const std::string &networkId, NetPacket &packet) {
56 this->OnSubscribeMouseLocation(networkId, packet);}},
58 [this] (const std::string &networkId, NetPacket &packet) {
59 this->OnUnSubscribeMouseLocation(networkId, packet);}},
61 [this] (const std::string &networkId, NetPacket &packet) {
62 this->OnReplySubscribeLocation(networkId, packet);}},
64 [this] (const std::string &networkId, NetPacket &packet) {
65 this->OnReplyUnSubscribeLocation(networkId, packet);}},
67 [this] (const std::string &networkId, NetPacket &packet) {
68 this->OnRemoteMouseLocation(networkId, packet);}},
70 [this] (const std::string &networkId, NetPacket &packet) {
71 this->OnRemoteInputDevice(networkId, packet);}},
73 [this] (const std::string &networkId, NetPacket &packet) {
74 this->OnRemoteHotPlug(networkId, packet);}}
120 NetPacket packet(MessageId::DSOFTBUS_START_COOPERATE);
121 packet << event.originNetworkId << event.cursorPos.x
123 if (packet.ChkRWError()) {
124 FI_HILOGE("Failed to write data packet");
127 int32_t ret = env_->GetDSoftbus().SendPacket(networkId, packet);
137 NetPacket packet(MessageId::DSOFTBUS_STOP_COOPERATE);
138 int32_t ret = env_->GetDSoftbus().SendPacket(networkId, packet);
148 NetPacket packet(MessageId::DSOFTBUS_COME_BACK);
149 packet << event.originNetworkId << event.cursorPos.x << event.cursorPos.y << event.extra.priv;
150 if (packet.ChkRWError()) {
151 FI_HILOGE("Failed to write data packet");
154 int32_t ret = env_->GetDSoftbus().SendPacket(networkId, packet);
164 NetPacket packet(MessageId::DSOFTBUS_RELAY_COOPERATE);
165 packet << event.targetNetworkId;
166 if (packet.ChkRWError()) {
167 FI_HILOGE("Failed to write data packet");
170 int32_t ret = env_->GetDSoftbus().SendPacket(networkId, packet);
180 NetPacket packet(MessageId::DSOFTBUS_RELAY_COOPERATE_FINISHED);
181 packet << event.targetNetworkId << event.normal;
182 if (packet.ChkRWError()) {
183 FI_HILOGE("Failed to write data packet");
186 int32_t ret = env_->GetDSoftbus().SendPacket(networkId, packet);
228 bool DSoftbusHandler::OnPacket(const std::string &networkId, NetPacket &packet)
231 int32_t messageId = static_cast<int32_t>(packet.GetMsgId());
234 (it->second)(networkId, packet);
262 void DSoftbusHandler::OnStartCooperate(const std::string &networkId, NetPacket &packet)
268 packet >> event.originNetworkId >> event.cursorPos.x
270 if (packet.ChkRWError()) {
271 FI_HILOGE("Failed to read data packet");
274 packet >> event.extra.priv;
275 if (packet.ChkRWError()) {
283 void DSoftbusHandler::OnStopCooperate(const std::string &networkId, NetPacket &packet)
295 void DSoftbusHandler::OnComeBack(const std::string &networkId, NetPacket &packet)
302 packet >> event.originNetworkId >> event.cursorPos.x >> event.cursorPos.y;
303 if (packet.ChkRWError()) {
304 FI_HILOGE("Failed to read data packet");
307 packet >> event.extra.priv;
308 if (packet.ChkRWError()) {
316 void DSoftbusHandler::OnRelayCooperate(const std::string &networkId, NetPacket &packet)
323 packet >> event.targetNetworkId;
324 if (packet.ChkRWError()) {
325 FI_HILOGE("Failed to read data packet");
333 void DSoftbusHandler::OnRelayCooperateFinish(const std::string &networkId, NetPacket &packet)
339 packet >> event.targetNetworkId >> event.normal;
340 if (packet.ChkRWError()) {
341 FI_HILOGE("Failed to read data packet");
349 void DSoftbusHandler::OnSubscribeMouseLocation(const std::string &networKId, NetPacket &packet)
353 packet >> event.networkId >> event.remoteNetworkId;
354 if (packet.ChkRWError()) {
355 FI_HILOGE("Failed to read data packet");
363 void DSoftbusHandler::OnUnSubscribeMouseLocation(const std::string& networKId, NetPacket &packet)
367 packet >> event.networkId >> event.remoteNetworkId;
368 if (packet.ChkRWError()) {
369 FI_HILOGE("Failed to read data packet");
377 void DSoftbusHandler::OnReplySubscribeLocation(const std::string& networKId, NetPacket &packet)
381 packet >> event.networkId >> event.remoteNetworkId >> event.result;
382 if (packet.ChkRWError()) {
383 FI_HILOGE("Failed to read data packet");
391 void DSoftbusHandler::OnReplyUnSubscribeLocation(const std::string& networKId, NetPacket &packet)
395 packet >> event.networkId >> event.remoteNetworkId >> event.result;
396 if (packet.ChkRWError()) {
397 FI_HILOGE("Failed to read data packet");
405 void DSoftbusHandler::OnRemoteMouseLocation(const std::string& networKId, NetPacket &packet)
409 packet >> event.networkId >> event.remoteNetworkId >> event.mouseLocation.displayX >>
411 if (packet.ChkRWError()) {
412 FI_HILOGE("Failed to read data packet");
420 void DSoftbusHandler::OnRemoteInputDevice(const std::string& networkId, NetPacket &packet)
425 packet >> devNum;
434 if (DeserializeDevice(device, packet) != RET_OK) {
445 void DSoftbusHandler::OnRemoteHotPlug(const std::string &networkId, NetPacket &packet)
449 packet >> event.type;
452 if (DeserializeDevice(device, packet) != RET_OK) {
462 int32_t DSoftbusHandler::DeserializeDevice(std::shared_ptr<IDevice> device, NetPacket &packet)
468 packet >> data;
470 packet >> str;
472 packet >> str;
474 packet >> data;
476 packet >> data;
478 packet >> data;
480 packet >> data;
482 packet >> str;
484 packet >> str;
486 packet >> str;
489 packet >> isPointerDevice;
494 packet >> isKeyboard;
499 packet >> keyboardType;
501 if (packet.ChkRWError()) {