@lazycatcloud/sdk 0.1.150 → 0.1.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/common/box.d.ts +0 -147
- package/dist/common/box.d.ts.map +0 -1
- package/dist/common/box.js +0 -430
- package/dist/common/box.js.map +0 -1
- package/dist/common/browseronly.d.ts +0 -131
- package/dist/common/browseronly.d.ts.map +0 -1
- package/dist/common/browseronly.js +0 -397
- package/dist/common/browseronly.js.map +0 -1
- package/dist/common/end_device.d.ts +0 -215
- package/dist/common/end_device.d.ts.map +0 -1
- package/dist/common/end_device.js +0 -489
- package/dist/common/end_device.js.map +0 -1
- package/dist/common/file_handler.d.ts +0 -158
- package/dist/common/file_handler.d.ts.map +0 -1
- package/dist/common/file_handler.js +0 -371
- package/dist/common/file_handler.js.map +0 -1
- package/dist/common/filetrans.d.ts +0 -870
- package/dist/common/filetrans.d.ts.map +0 -1
- package/dist/common/filetrans.js +0 -1459
- package/dist/common/filetrans.js.map +0 -1
- package/dist/common/gateway.d.ts +0 -203
- package/dist/common/gateway.d.ts.map +0 -1
- package/dist/common/gateway.js +0 -522
- package/dist/common/gateway.js.map +0 -1
- package/dist/common/message.d.ts +0 -56
- package/dist/common/message.d.ts.map +0 -1
- package/dist/common/message.js +0 -215
- package/dist/common/message.js.map +0 -1
- package/dist/common/peripheral_device.d.ts +0 -266
- package/dist/common/peripheral_device.d.ts.map +0 -1
- package/dist/common/peripheral_device.js +0 -608
- package/dist/common/peripheral_device.js.map +0 -1
- package/dist/common/security_context.d.ts +0 -202
- package/dist/common/security_context.d.ts.map +0 -1
- package/dist/common/security_context.js +0 -598
- package/dist/common/security_context.js.map +0 -1
- package/dist/common/users.d.ts +0 -254
- package/dist/common/users.d.ts.map +0 -1
- package/dist/common/users.js +0 -821
- package/dist/common/users.js.map +0 -1
- package/dist/dlna/dlna.d.ts +0 -243
- package/dist/dlna/dlna.d.ts.map +0 -1
- package/dist/dlna/dlna.js +0 -732
- package/dist/dlna/dlna.js.map +0 -1
- package/dist/extentions/app_common.d.ts +0 -8
- package/dist/extentions/app_common.d.ts.map +0 -1
- package/dist/extentions/app_common.js +0 -31
- package/dist/extentions/app_common.js.map +0 -1
- package/dist/extentions/safe_app.d.ts +0 -15
- package/dist/extentions/safe_app.d.ts.map +0 -1
- package/dist/extentions/safe_app.js +0 -52
- package/dist/extentions/safe_app.js.map +0 -1
- package/dist/extentions/unsafe_app.d.ts +0 -18
- package/dist/extentions/unsafe_app.d.ts.map +0 -1
- package/dist/extentions/unsafe_app.js +0 -92
- package/dist/extentions/unsafe_app.js.map +0 -1
- package/dist/google/protobuf/descriptor.d.ts +0 -51463
- package/dist/google/protobuf/descriptor.d.ts.map +0 -1
- package/dist/google/protobuf/descriptor.js +0 -2893
- package/dist/google/protobuf/descriptor.js.map +0 -1
- package/dist/google/protobuf/empty.d.ts +0 -20
- package/dist/google/protobuf/empty.d.ts.map +0 -1
- package/dist/google/protobuf/empty.js +0 -42
- package/dist/google/protobuf/empty.js.map +0 -1
- package/dist/google/protobuf/timestamp.d.ts +0 -121
- package/dist/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/google/protobuf/timestamp.js +0 -91
- package/dist/google/protobuf/timestamp.js.map +0 -1
- package/dist/grpcweb.d.ts +0 -21
- package/dist/grpcweb.d.ts.map +0 -1
- package/dist/grpcweb.js +0 -71
- package/dist/grpcweb.js.map +0 -1
- package/dist/index.d.ts +0 -61
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -132
- package/dist/index.js.map +0 -1
- package/dist/lanforward/lanforward.d.ts +0 -86
- package/dist/lanforward/lanforward.d.ts.map +0 -1
- package/dist/lanforward/lanforward.js +0 -217
- package/dist/lanforward/lanforward.js.map +0 -1
- package/dist/localdevice/clipboard.d.ts +0 -114
- package/dist/localdevice/clipboard.d.ts.map +0 -1
- package/dist/localdevice/clipboard.js +0 -387
- package/dist/localdevice/clipboard.js.map +0 -1
- package/dist/localdevice/config.d.ts +0 -78
- package/dist/localdevice/config.d.ts.map +0 -1
- package/dist/localdevice/config.js +0 -187
- package/dist/localdevice/config.js.map +0 -1
- package/dist/localdevice/device.d.ts +0 -68
- package/dist/localdevice/device.d.ts.map +0 -1
- package/dist/localdevice/device.js +0 -155
- package/dist/localdevice/device.js.map +0 -1
- package/dist/localdevice/dialog.d.ts +0 -188
- package/dist/localdevice/dialog.d.ts.map +0 -1
- package/dist/localdevice/dialog.js +0 -555
- package/dist/localdevice/dialog.js.map +0 -1
- package/dist/localdevice/local-launch.d.ts +0 -195
- package/dist/localdevice/local-launch.d.ts.map +0 -1
- package/dist/localdevice/local-launch.js +0 -574
- package/dist/localdevice/local-launch.js.map +0 -1
- package/dist/localdevice/network.d.ts +0 -76
- package/dist/localdevice/network.d.ts.map +0 -1
- package/dist/localdevice/network.js +0 -212
- package/dist/localdevice/network.js.map +0 -1
- package/dist/localdevice/permission.d.ts +0 -98
- package/dist/localdevice/permission.d.ts.map +0 -1
- package/dist/localdevice/permission.js +0 -258
- package/dist/localdevice/permission.js.map +0 -1
- package/dist/localdevice/photo.d.ts +0 -410
- package/dist/localdevice/photo.d.ts.map +0 -1
- package/dist/localdevice/photo.js +0 -1235
- package/dist/localdevice/photo.js.map +0 -1
- package/dist/package.json +0 -24
- package/dist/ssdp/ssdp.d.ts +0 -94
- package/dist/ssdp/ssdp.d.ts.map +0 -1
- package/dist/ssdp/ssdp.js +0 -246
- package/dist/ssdp/ssdp.js.map +0 -1
- package/dist/sys/OS_daemon.d.ts +0 -93
- package/dist/sys/OS_daemon.d.ts.map +0 -1
- package/dist/sys/OS_daemon.js +0 -240
- package/dist/sys/OS_daemon.js.map +0 -1
- package/dist/sys/OS_snapshot.d.ts +0 -437
- package/dist/sys/OS_snapshot.d.ts.map +0 -1
- package/dist/sys/OS_snapshot.js +0 -1331
- package/dist/sys/OS_snapshot.js.map +0 -1
- package/dist/sys/OS_upgrader.d.ts +0 -183
- package/dist/sys/OS_upgrader.d.ts.map +0 -1
- package/dist/sys/OS_upgrader.js +0 -606
- package/dist/sys/OS_upgrader.js.map +0 -1
- package/dist/sys/event.d.ts +0 -219
- package/dist/sys/event.d.ts.map +0 -1
- package/dist/sys/event.js +0 -619
- package/dist/sys/event.js.map +0 -1
- package/dist/sys/hc-core/hc-core.d.ts +0 -477
- package/dist/sys/hc-core/hc-core.d.ts.map +0 -1
- package/dist/sys/hc-core/hc-core.js +0 -1294
- package/dist/sys/hc-core/hc-core.js.map +0 -1
- package/dist/sys/ingress.d.ts +0 -265
- package/dist/sys/ingress.d.ts.map +0 -1
- package/dist/sys/ingress.js +0 -851
- package/dist/sys/ingress.js.map +0 -1
- package/dist/sys/network_manager.d.ts +0 -303
- package/dist/sys/network_manager.d.ts.map +0 -1
- package/dist/sys/network_manager.js +0 -712
- package/dist/sys/network_manager.js.map +0 -1
- package/dist/sys/package_manager.d.ts +0 -599
- package/dist/sys/package_manager.d.ts.map +0 -1
- package/dist/sys/package_manager.js +0 -1508
- package/dist/sys/package_manager.js.map +0 -1
- package/dist/sys/portal-server/portal-server.d.ts +0 -783
- package/dist/sys/portal-server/portal-server.d.ts.map +0 -1
- package/dist/sys/portal-server/portal-server.js +0 -2364
- package/dist/sys/portal-server/portal-server.js.map +0 -1
- package/dist/sys/snapd.d.ts +0 -256
- package/dist/sys/snapd.d.ts.map +0 -1
- package/dist/sys/snapd.js +0 -680
- package/dist/sys/snapd.js.map +0 -1
|
@@ -1,712 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GrpcWebError = exports.GrpcWebImpl = exports.NetworkManagerWifiConfigAddDesc = exports.NetworkManagerWifiConnectDesc = exports.NetworkManagerWifiListDesc = exports.NetworkManagerWifiScanDesc = exports.NetworkManagerStatusDesc = exports.NetworkManagerDesc = exports.NetworkManagerClientImpl = exports.WifiConnectReply = exports.WifiConfigInfo = exports.WifiConnectInfo = exports.NetworkDeviceStatusInfo = exports.AccessPointInfoList = exports.AccessPointInfo = exports.wifiConnectResultToJSON = exports.wifiConnectResultFromJSON = exports.WifiConnectResult = exports.keyMgmtToJSON = exports.keyMgmtFromJSON = exports.KeyMgmt = exports.networkDeviceStatusToJSON = exports.networkDeviceStatusFromJSON = exports.NetworkDeviceStatus = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
9
|
-
const browser_headers_1 = require("browser-headers");
|
|
10
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
11
|
-
const empty_1 = require("../google/protobuf/empty");
|
|
12
|
-
var NetworkDeviceStatus;
|
|
13
|
-
(function (NetworkDeviceStatus) {
|
|
14
|
-
/** NetworkDeviceStatusUnavailable - 不可用 */
|
|
15
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusUnavailable"] = 0] = "NetworkDeviceStatusUnavailable";
|
|
16
|
-
/** NetworkDeviceStatusDisconnected - 未连接 */
|
|
17
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusDisconnected"] = 1] = "NetworkDeviceStatusDisconnected";
|
|
18
|
-
/** NetworkDeviceStatusConnecting - 正在连接 */
|
|
19
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusConnecting"] = 2] = "NetworkDeviceStatusConnecting";
|
|
20
|
-
/** NetworkDeviceStatusConnected - 已连接 */
|
|
21
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusConnected"] = 3] = "NetworkDeviceStatusConnected";
|
|
22
|
-
/** NetworkDeviceStatusDisconnecting - 正在断开 */
|
|
23
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusDisconnecting"] = 4] = "NetworkDeviceStatusDisconnecting";
|
|
24
|
-
/** NetworkDeviceStatusDisabled - 已禁用 */
|
|
25
|
-
NetworkDeviceStatus[NetworkDeviceStatus["NetworkDeviceStatusDisabled"] = 5] = "NetworkDeviceStatusDisabled";
|
|
26
|
-
NetworkDeviceStatus[NetworkDeviceStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
27
|
-
})(NetworkDeviceStatus = exports.NetworkDeviceStatus || (exports.NetworkDeviceStatus = {}));
|
|
28
|
-
function networkDeviceStatusFromJSON(object) {
|
|
29
|
-
switch (object) {
|
|
30
|
-
case 0:
|
|
31
|
-
case "NetworkDeviceStatusUnavailable":
|
|
32
|
-
return NetworkDeviceStatus.NetworkDeviceStatusUnavailable;
|
|
33
|
-
case 1:
|
|
34
|
-
case "NetworkDeviceStatusDisconnected":
|
|
35
|
-
return NetworkDeviceStatus.NetworkDeviceStatusDisconnected;
|
|
36
|
-
case 2:
|
|
37
|
-
case "NetworkDeviceStatusConnecting":
|
|
38
|
-
return NetworkDeviceStatus.NetworkDeviceStatusConnecting;
|
|
39
|
-
case 3:
|
|
40
|
-
case "NetworkDeviceStatusConnected":
|
|
41
|
-
return NetworkDeviceStatus.NetworkDeviceStatusConnected;
|
|
42
|
-
case 4:
|
|
43
|
-
case "NetworkDeviceStatusDisconnecting":
|
|
44
|
-
return NetworkDeviceStatus.NetworkDeviceStatusDisconnecting;
|
|
45
|
-
case 5:
|
|
46
|
-
case "NetworkDeviceStatusDisabled":
|
|
47
|
-
return NetworkDeviceStatus.NetworkDeviceStatusDisabled;
|
|
48
|
-
case -1:
|
|
49
|
-
case "UNRECOGNIZED":
|
|
50
|
-
default:
|
|
51
|
-
return NetworkDeviceStatus.UNRECOGNIZED;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.networkDeviceStatusFromJSON = networkDeviceStatusFromJSON;
|
|
55
|
-
function networkDeviceStatusToJSON(object) {
|
|
56
|
-
switch (object) {
|
|
57
|
-
case NetworkDeviceStatus.NetworkDeviceStatusUnavailable:
|
|
58
|
-
return "NetworkDeviceStatusUnavailable";
|
|
59
|
-
case NetworkDeviceStatus.NetworkDeviceStatusDisconnected:
|
|
60
|
-
return "NetworkDeviceStatusDisconnected";
|
|
61
|
-
case NetworkDeviceStatus.NetworkDeviceStatusConnecting:
|
|
62
|
-
return "NetworkDeviceStatusConnecting";
|
|
63
|
-
case NetworkDeviceStatus.NetworkDeviceStatusConnected:
|
|
64
|
-
return "NetworkDeviceStatusConnected";
|
|
65
|
-
case NetworkDeviceStatus.NetworkDeviceStatusDisconnecting:
|
|
66
|
-
return "NetworkDeviceStatusDisconnecting";
|
|
67
|
-
case NetworkDeviceStatus.NetworkDeviceStatusDisabled:
|
|
68
|
-
return "NetworkDeviceStatusDisabled";
|
|
69
|
-
case NetworkDeviceStatus.UNRECOGNIZED:
|
|
70
|
-
default:
|
|
71
|
-
return "UNRECOGNIZED";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.networkDeviceStatusToJSON = networkDeviceStatusToJSON;
|
|
75
|
-
var KeyMgmt;
|
|
76
|
-
(function (KeyMgmt) {
|
|
77
|
-
KeyMgmt[KeyMgmt["KeyMgmtNone"] = 0] = "KeyMgmtNone";
|
|
78
|
-
/** KeyMgmtWEP - WEP (最老的协议了,目前几乎没人用) */
|
|
79
|
-
KeyMgmt[KeyMgmt["KeyMgmtWEP"] = 1] = "KeyMgmtWEP";
|
|
80
|
-
/** KeyMgmtWPA_PSK - WPA/WPA2-Personal (一般大概率都是这个,应当作为默认值) */
|
|
81
|
-
KeyMgmt[KeyMgmt["KeyMgmtWPA_PSK"] = 2] = "KeyMgmtWPA_PSK";
|
|
82
|
-
/** KeyMgmtSAE - WPA3-Personal (新一代协议,用的人比较少) */
|
|
83
|
-
KeyMgmt[KeyMgmt["KeyMgmtSAE"] = 3] = "KeyMgmtSAE";
|
|
84
|
-
KeyMgmt[KeyMgmt["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
85
|
-
})(KeyMgmt = exports.KeyMgmt || (exports.KeyMgmt = {}));
|
|
86
|
-
function keyMgmtFromJSON(object) {
|
|
87
|
-
switch (object) {
|
|
88
|
-
case 0:
|
|
89
|
-
case "KeyMgmtNone":
|
|
90
|
-
return KeyMgmt.KeyMgmtNone;
|
|
91
|
-
case 1:
|
|
92
|
-
case "KeyMgmtWEP":
|
|
93
|
-
return KeyMgmt.KeyMgmtWEP;
|
|
94
|
-
case 2:
|
|
95
|
-
case "KeyMgmtWPA_PSK":
|
|
96
|
-
return KeyMgmt.KeyMgmtWPA_PSK;
|
|
97
|
-
case 3:
|
|
98
|
-
case "KeyMgmtSAE":
|
|
99
|
-
return KeyMgmt.KeyMgmtSAE;
|
|
100
|
-
case -1:
|
|
101
|
-
case "UNRECOGNIZED":
|
|
102
|
-
default:
|
|
103
|
-
return KeyMgmt.UNRECOGNIZED;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
exports.keyMgmtFromJSON = keyMgmtFromJSON;
|
|
107
|
-
function keyMgmtToJSON(object) {
|
|
108
|
-
switch (object) {
|
|
109
|
-
case KeyMgmt.KeyMgmtNone:
|
|
110
|
-
return "KeyMgmtNone";
|
|
111
|
-
case KeyMgmt.KeyMgmtWEP:
|
|
112
|
-
return "KeyMgmtWEP";
|
|
113
|
-
case KeyMgmt.KeyMgmtWPA_PSK:
|
|
114
|
-
return "KeyMgmtWPA_PSK";
|
|
115
|
-
case KeyMgmt.KeyMgmtSAE:
|
|
116
|
-
return "KeyMgmtSAE";
|
|
117
|
-
case KeyMgmt.UNRECOGNIZED:
|
|
118
|
-
default:
|
|
119
|
-
return "UNRECOGNIZED";
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.keyMgmtToJSON = keyMgmtToJSON;
|
|
123
|
-
var WifiConnectResult;
|
|
124
|
-
(function (WifiConnectResult) {
|
|
125
|
-
WifiConnectResult[WifiConnectResult["WifiConnectResultSuccess"] = 0] = "WifiConnectResultSuccess";
|
|
126
|
-
WifiConnectResult[WifiConnectResult["WifiConnectResultNoSuchBssid"] = 1] = "WifiConnectResultNoSuchBssid";
|
|
127
|
-
WifiConnectResult[WifiConnectResult["WifiConnectResultWrongPassword"] = 2] = "WifiConnectResultWrongPassword";
|
|
128
|
-
WifiConnectResult[WifiConnectResult["WifiConnectResultUnknownError"] = 3] = "WifiConnectResultUnknownError";
|
|
129
|
-
WifiConnectResult[WifiConnectResult["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
130
|
-
})(WifiConnectResult = exports.WifiConnectResult || (exports.WifiConnectResult = {}));
|
|
131
|
-
function wifiConnectResultFromJSON(object) {
|
|
132
|
-
switch (object) {
|
|
133
|
-
case 0:
|
|
134
|
-
case "WifiConnectResultSuccess":
|
|
135
|
-
return WifiConnectResult.WifiConnectResultSuccess;
|
|
136
|
-
case 1:
|
|
137
|
-
case "WifiConnectResultNoSuchBssid":
|
|
138
|
-
return WifiConnectResult.WifiConnectResultNoSuchBssid;
|
|
139
|
-
case 2:
|
|
140
|
-
case "WifiConnectResultWrongPassword":
|
|
141
|
-
return WifiConnectResult.WifiConnectResultWrongPassword;
|
|
142
|
-
case 3:
|
|
143
|
-
case "WifiConnectResultUnknownError":
|
|
144
|
-
return WifiConnectResult.WifiConnectResultUnknownError;
|
|
145
|
-
case -1:
|
|
146
|
-
case "UNRECOGNIZED":
|
|
147
|
-
default:
|
|
148
|
-
return WifiConnectResult.UNRECOGNIZED;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
exports.wifiConnectResultFromJSON = wifiConnectResultFromJSON;
|
|
152
|
-
function wifiConnectResultToJSON(object) {
|
|
153
|
-
switch (object) {
|
|
154
|
-
case WifiConnectResult.WifiConnectResultSuccess:
|
|
155
|
-
return "WifiConnectResultSuccess";
|
|
156
|
-
case WifiConnectResult.WifiConnectResultNoSuchBssid:
|
|
157
|
-
return "WifiConnectResultNoSuchBssid";
|
|
158
|
-
case WifiConnectResult.WifiConnectResultWrongPassword:
|
|
159
|
-
return "WifiConnectResultWrongPassword";
|
|
160
|
-
case WifiConnectResult.WifiConnectResultUnknownError:
|
|
161
|
-
return "WifiConnectResultUnknownError";
|
|
162
|
-
case WifiConnectResult.UNRECOGNIZED:
|
|
163
|
-
default:
|
|
164
|
-
return "UNRECOGNIZED";
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
exports.wifiConnectResultToJSON = wifiConnectResultToJSON;
|
|
168
|
-
function createBaseAccessPointInfo() {
|
|
169
|
-
return { bssid: "", ssid: "", signal: 0, security: false, connected: false, saved: false, autoConnected: false };
|
|
170
|
-
}
|
|
171
|
-
exports.AccessPointInfo = {
|
|
172
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
173
|
-
if (message.bssid !== "") {
|
|
174
|
-
writer.uint32(10).string(message.bssid);
|
|
175
|
-
}
|
|
176
|
-
if (message.ssid !== "") {
|
|
177
|
-
writer.uint32(18).string(message.ssid);
|
|
178
|
-
}
|
|
179
|
-
if (message.signal !== 0) {
|
|
180
|
-
writer.uint32(24).int32(message.signal);
|
|
181
|
-
}
|
|
182
|
-
if (message.security === true) {
|
|
183
|
-
writer.uint32(32).bool(message.security);
|
|
184
|
-
}
|
|
185
|
-
if (message.connected === true) {
|
|
186
|
-
writer.uint32(40).bool(message.connected);
|
|
187
|
-
}
|
|
188
|
-
if (message.saved === true) {
|
|
189
|
-
writer.uint32(48).bool(message.saved);
|
|
190
|
-
}
|
|
191
|
-
if (message.autoConnected === true) {
|
|
192
|
-
writer.uint32(56).bool(message.autoConnected);
|
|
193
|
-
}
|
|
194
|
-
return writer;
|
|
195
|
-
},
|
|
196
|
-
decode(input, length) {
|
|
197
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
198
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
199
|
-
const message = createBaseAccessPointInfo();
|
|
200
|
-
while (reader.pos < end) {
|
|
201
|
-
const tag = reader.uint32();
|
|
202
|
-
switch (tag >>> 3) {
|
|
203
|
-
case 1:
|
|
204
|
-
message.bssid = reader.string();
|
|
205
|
-
break;
|
|
206
|
-
case 2:
|
|
207
|
-
message.ssid = reader.string();
|
|
208
|
-
break;
|
|
209
|
-
case 3:
|
|
210
|
-
message.signal = reader.int32();
|
|
211
|
-
break;
|
|
212
|
-
case 4:
|
|
213
|
-
message.security = reader.bool();
|
|
214
|
-
break;
|
|
215
|
-
case 5:
|
|
216
|
-
message.connected = reader.bool();
|
|
217
|
-
break;
|
|
218
|
-
case 6:
|
|
219
|
-
message.saved = reader.bool();
|
|
220
|
-
break;
|
|
221
|
-
case 7:
|
|
222
|
-
message.autoConnected = reader.bool();
|
|
223
|
-
break;
|
|
224
|
-
default:
|
|
225
|
-
reader.skipType(tag & 7);
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return message;
|
|
230
|
-
},
|
|
231
|
-
fromJSON(object) {
|
|
232
|
-
return {
|
|
233
|
-
bssid: isSet(object.bssid) ? String(object.bssid) : "",
|
|
234
|
-
ssid: isSet(object.ssid) ? String(object.ssid) : "",
|
|
235
|
-
signal: isSet(object.signal) ? Number(object.signal) : 0,
|
|
236
|
-
security: isSet(object.security) ? Boolean(object.security) : false,
|
|
237
|
-
connected: isSet(object.connected) ? Boolean(object.connected) : false,
|
|
238
|
-
saved: isSet(object.saved) ? Boolean(object.saved) : false,
|
|
239
|
-
autoConnected: isSet(object.autoConnected) ? Boolean(object.autoConnected) : false,
|
|
240
|
-
};
|
|
241
|
-
},
|
|
242
|
-
toJSON(message) {
|
|
243
|
-
const obj = {};
|
|
244
|
-
message.bssid !== undefined && (obj.bssid = message.bssid);
|
|
245
|
-
message.ssid !== undefined && (obj.ssid = message.ssid);
|
|
246
|
-
message.signal !== undefined && (obj.signal = Math.round(message.signal));
|
|
247
|
-
message.security !== undefined && (obj.security = message.security);
|
|
248
|
-
message.connected !== undefined && (obj.connected = message.connected);
|
|
249
|
-
message.saved !== undefined && (obj.saved = message.saved);
|
|
250
|
-
message.autoConnected !== undefined && (obj.autoConnected = message.autoConnected);
|
|
251
|
-
return obj;
|
|
252
|
-
},
|
|
253
|
-
fromPartial(object) {
|
|
254
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
255
|
-
const message = createBaseAccessPointInfo();
|
|
256
|
-
message.bssid = (_a = object.bssid) !== null && _a !== void 0 ? _a : "";
|
|
257
|
-
message.ssid = (_b = object.ssid) !== null && _b !== void 0 ? _b : "";
|
|
258
|
-
message.signal = (_c = object.signal) !== null && _c !== void 0 ? _c : 0;
|
|
259
|
-
message.security = (_d = object.security) !== null && _d !== void 0 ? _d : false;
|
|
260
|
-
message.connected = (_e = object.connected) !== null && _e !== void 0 ? _e : false;
|
|
261
|
-
message.saved = (_f = object.saved) !== null && _f !== void 0 ? _f : false;
|
|
262
|
-
message.autoConnected = (_g = object.autoConnected) !== null && _g !== void 0 ? _g : false;
|
|
263
|
-
return message;
|
|
264
|
-
},
|
|
265
|
-
};
|
|
266
|
-
function createBaseAccessPointInfoList() {
|
|
267
|
-
return { list: [] };
|
|
268
|
-
}
|
|
269
|
-
exports.AccessPointInfoList = {
|
|
270
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
271
|
-
for (const v of message.list) {
|
|
272
|
-
exports.AccessPointInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
273
|
-
}
|
|
274
|
-
return writer;
|
|
275
|
-
},
|
|
276
|
-
decode(input, length) {
|
|
277
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
278
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
279
|
-
const message = createBaseAccessPointInfoList();
|
|
280
|
-
while (reader.pos < end) {
|
|
281
|
-
const tag = reader.uint32();
|
|
282
|
-
switch (tag >>> 3) {
|
|
283
|
-
case 1:
|
|
284
|
-
message.list.push(exports.AccessPointInfo.decode(reader, reader.uint32()));
|
|
285
|
-
break;
|
|
286
|
-
default:
|
|
287
|
-
reader.skipType(tag & 7);
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return message;
|
|
292
|
-
},
|
|
293
|
-
fromJSON(object) {
|
|
294
|
-
return { list: Array.isArray(object === null || object === void 0 ? void 0 : object.list) ? object.list.map((e) => exports.AccessPointInfo.fromJSON(e)) : [] };
|
|
295
|
-
},
|
|
296
|
-
toJSON(message) {
|
|
297
|
-
const obj = {};
|
|
298
|
-
if (message.list) {
|
|
299
|
-
obj.list = message.list.map((e) => e ? exports.AccessPointInfo.toJSON(e) : undefined);
|
|
300
|
-
}
|
|
301
|
-
else {
|
|
302
|
-
obj.list = [];
|
|
303
|
-
}
|
|
304
|
-
return obj;
|
|
305
|
-
},
|
|
306
|
-
fromPartial(object) {
|
|
307
|
-
var _a;
|
|
308
|
-
const message = createBaseAccessPointInfoList();
|
|
309
|
-
message.list = ((_a = object.list) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AccessPointInfo.fromPartial(e))) || [];
|
|
310
|
-
return message;
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
function createBaseNetworkDeviceStatusInfo() {
|
|
314
|
-
return { hasInternet: false, WiredDevice: 0, WirelessDevice: 0, info: undefined };
|
|
315
|
-
}
|
|
316
|
-
exports.NetworkDeviceStatusInfo = {
|
|
317
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
318
|
-
if (message.hasInternet === true) {
|
|
319
|
-
writer.uint32(8).bool(message.hasInternet);
|
|
320
|
-
}
|
|
321
|
-
if (message.WiredDevice !== 0) {
|
|
322
|
-
writer.uint32(16).int32(message.WiredDevice);
|
|
323
|
-
}
|
|
324
|
-
if (message.WirelessDevice !== 0) {
|
|
325
|
-
writer.uint32(24).int32(message.WirelessDevice);
|
|
326
|
-
}
|
|
327
|
-
if (message.info !== undefined) {
|
|
328
|
-
exports.AccessPointInfo.encode(message.info, writer.uint32(34).fork()).ldelim();
|
|
329
|
-
}
|
|
330
|
-
return writer;
|
|
331
|
-
},
|
|
332
|
-
decode(input, length) {
|
|
333
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
334
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
335
|
-
const message = createBaseNetworkDeviceStatusInfo();
|
|
336
|
-
while (reader.pos < end) {
|
|
337
|
-
const tag = reader.uint32();
|
|
338
|
-
switch (tag >>> 3) {
|
|
339
|
-
case 1:
|
|
340
|
-
message.hasInternet = reader.bool();
|
|
341
|
-
break;
|
|
342
|
-
case 2:
|
|
343
|
-
message.WiredDevice = reader.int32();
|
|
344
|
-
break;
|
|
345
|
-
case 3:
|
|
346
|
-
message.WirelessDevice = reader.int32();
|
|
347
|
-
break;
|
|
348
|
-
case 4:
|
|
349
|
-
message.info = exports.AccessPointInfo.decode(reader, reader.uint32());
|
|
350
|
-
break;
|
|
351
|
-
default:
|
|
352
|
-
reader.skipType(tag & 7);
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
return message;
|
|
357
|
-
},
|
|
358
|
-
fromJSON(object) {
|
|
359
|
-
return {
|
|
360
|
-
hasInternet: isSet(object.hasInternet) ? Boolean(object.hasInternet) : false,
|
|
361
|
-
WiredDevice: isSet(object.WiredDevice) ? networkDeviceStatusFromJSON(object.WiredDevice) : 0,
|
|
362
|
-
WirelessDevice: isSet(object.WirelessDevice) ? networkDeviceStatusFromJSON(object.WirelessDevice) : 0,
|
|
363
|
-
info: isSet(object.info) ? exports.AccessPointInfo.fromJSON(object.info) : undefined,
|
|
364
|
-
};
|
|
365
|
-
},
|
|
366
|
-
toJSON(message) {
|
|
367
|
-
const obj = {};
|
|
368
|
-
message.hasInternet !== undefined && (obj.hasInternet = message.hasInternet);
|
|
369
|
-
message.WiredDevice !== undefined && (obj.WiredDevice = networkDeviceStatusToJSON(message.WiredDevice));
|
|
370
|
-
message.WirelessDevice !== undefined && (obj.WirelessDevice = networkDeviceStatusToJSON(message.WirelessDevice));
|
|
371
|
-
message.info !== undefined && (obj.info = message.info ? exports.AccessPointInfo.toJSON(message.info) : undefined);
|
|
372
|
-
return obj;
|
|
373
|
-
},
|
|
374
|
-
fromPartial(object) {
|
|
375
|
-
var _a, _b, _c;
|
|
376
|
-
const message = createBaseNetworkDeviceStatusInfo();
|
|
377
|
-
message.hasInternet = (_a = object.hasInternet) !== null && _a !== void 0 ? _a : false;
|
|
378
|
-
message.WiredDevice = (_b = object.WiredDevice) !== null && _b !== void 0 ? _b : 0;
|
|
379
|
-
message.WirelessDevice = (_c = object.WirelessDevice) !== null && _c !== void 0 ? _c : 0;
|
|
380
|
-
message.info = (object.info !== undefined && object.info !== null)
|
|
381
|
-
? exports.AccessPointInfo.fromPartial(object.info)
|
|
382
|
-
: undefined;
|
|
383
|
-
return message;
|
|
384
|
-
},
|
|
385
|
-
};
|
|
386
|
-
function createBaseWifiConnectInfo() {
|
|
387
|
-
return { bssid: "", ssid: "", password: "" };
|
|
388
|
-
}
|
|
389
|
-
exports.WifiConnectInfo = {
|
|
390
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
391
|
-
if (message.bssid !== "") {
|
|
392
|
-
writer.uint32(10).string(message.bssid);
|
|
393
|
-
}
|
|
394
|
-
if (message.ssid !== "") {
|
|
395
|
-
writer.uint32(18).string(message.ssid);
|
|
396
|
-
}
|
|
397
|
-
if (message.password !== "") {
|
|
398
|
-
writer.uint32(26).string(message.password);
|
|
399
|
-
}
|
|
400
|
-
return writer;
|
|
401
|
-
},
|
|
402
|
-
decode(input, length) {
|
|
403
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
404
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
405
|
-
const message = createBaseWifiConnectInfo();
|
|
406
|
-
while (reader.pos < end) {
|
|
407
|
-
const tag = reader.uint32();
|
|
408
|
-
switch (tag >>> 3) {
|
|
409
|
-
case 1:
|
|
410
|
-
message.bssid = reader.string();
|
|
411
|
-
break;
|
|
412
|
-
case 2:
|
|
413
|
-
message.ssid = reader.string();
|
|
414
|
-
break;
|
|
415
|
-
case 3:
|
|
416
|
-
message.password = reader.string();
|
|
417
|
-
break;
|
|
418
|
-
default:
|
|
419
|
-
reader.skipType(tag & 7);
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
return message;
|
|
424
|
-
},
|
|
425
|
-
fromJSON(object) {
|
|
426
|
-
return {
|
|
427
|
-
bssid: isSet(object.bssid) ? String(object.bssid) : "",
|
|
428
|
-
ssid: isSet(object.ssid) ? String(object.ssid) : "",
|
|
429
|
-
password: isSet(object.password) ? String(object.password) : "",
|
|
430
|
-
};
|
|
431
|
-
},
|
|
432
|
-
toJSON(message) {
|
|
433
|
-
const obj = {};
|
|
434
|
-
message.bssid !== undefined && (obj.bssid = message.bssid);
|
|
435
|
-
message.ssid !== undefined && (obj.ssid = message.ssid);
|
|
436
|
-
message.password !== undefined && (obj.password = message.password);
|
|
437
|
-
return obj;
|
|
438
|
-
},
|
|
439
|
-
fromPartial(object) {
|
|
440
|
-
var _a, _b, _c;
|
|
441
|
-
const message = createBaseWifiConnectInfo();
|
|
442
|
-
message.bssid = (_a = object.bssid) !== null && _a !== void 0 ? _a : "";
|
|
443
|
-
message.ssid = (_b = object.ssid) !== null && _b !== void 0 ? _b : "";
|
|
444
|
-
message.password = (_c = object.password) !== null && _c !== void 0 ? _c : "";
|
|
445
|
-
return message;
|
|
446
|
-
},
|
|
447
|
-
};
|
|
448
|
-
function createBaseWifiConfigInfo() {
|
|
449
|
-
return { ssid: "", password: "", keyMgmt: 0 };
|
|
450
|
-
}
|
|
451
|
-
exports.WifiConfigInfo = {
|
|
452
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
453
|
-
if (message.ssid !== "") {
|
|
454
|
-
writer.uint32(10).string(message.ssid);
|
|
455
|
-
}
|
|
456
|
-
if (message.password !== "") {
|
|
457
|
-
writer.uint32(18).string(message.password);
|
|
458
|
-
}
|
|
459
|
-
if (message.keyMgmt !== 0) {
|
|
460
|
-
writer.uint32(24).int32(message.keyMgmt);
|
|
461
|
-
}
|
|
462
|
-
return writer;
|
|
463
|
-
},
|
|
464
|
-
decode(input, length) {
|
|
465
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
466
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
467
|
-
const message = createBaseWifiConfigInfo();
|
|
468
|
-
while (reader.pos < end) {
|
|
469
|
-
const tag = reader.uint32();
|
|
470
|
-
switch (tag >>> 3) {
|
|
471
|
-
case 1:
|
|
472
|
-
message.ssid = reader.string();
|
|
473
|
-
break;
|
|
474
|
-
case 2:
|
|
475
|
-
message.password = reader.string();
|
|
476
|
-
break;
|
|
477
|
-
case 3:
|
|
478
|
-
message.keyMgmt = reader.int32();
|
|
479
|
-
break;
|
|
480
|
-
default:
|
|
481
|
-
reader.skipType(tag & 7);
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
return message;
|
|
486
|
-
},
|
|
487
|
-
fromJSON(object) {
|
|
488
|
-
return {
|
|
489
|
-
ssid: isSet(object.ssid) ? String(object.ssid) : "",
|
|
490
|
-
password: isSet(object.password) ? String(object.password) : "",
|
|
491
|
-
keyMgmt: isSet(object.keyMgmt) ? keyMgmtFromJSON(object.keyMgmt) : 0,
|
|
492
|
-
};
|
|
493
|
-
},
|
|
494
|
-
toJSON(message) {
|
|
495
|
-
const obj = {};
|
|
496
|
-
message.ssid !== undefined && (obj.ssid = message.ssid);
|
|
497
|
-
message.password !== undefined && (obj.password = message.password);
|
|
498
|
-
message.keyMgmt !== undefined && (obj.keyMgmt = keyMgmtToJSON(message.keyMgmt));
|
|
499
|
-
return obj;
|
|
500
|
-
},
|
|
501
|
-
fromPartial(object) {
|
|
502
|
-
var _a, _b, _c;
|
|
503
|
-
const message = createBaseWifiConfigInfo();
|
|
504
|
-
message.ssid = (_a = object.ssid) !== null && _a !== void 0 ? _a : "";
|
|
505
|
-
message.password = (_b = object.password) !== null && _b !== void 0 ? _b : "";
|
|
506
|
-
message.keyMgmt = (_c = object.keyMgmt) !== null && _c !== void 0 ? _c : 0;
|
|
507
|
-
return message;
|
|
508
|
-
},
|
|
509
|
-
};
|
|
510
|
-
function createBaseWifiConnectReply() {
|
|
511
|
-
return { result: 0 };
|
|
512
|
-
}
|
|
513
|
-
exports.WifiConnectReply = {
|
|
514
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
515
|
-
if (message.result !== 0) {
|
|
516
|
-
writer.uint32(8).int32(message.result);
|
|
517
|
-
}
|
|
518
|
-
return writer;
|
|
519
|
-
},
|
|
520
|
-
decode(input, length) {
|
|
521
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
522
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
523
|
-
const message = createBaseWifiConnectReply();
|
|
524
|
-
while (reader.pos < end) {
|
|
525
|
-
const tag = reader.uint32();
|
|
526
|
-
switch (tag >>> 3) {
|
|
527
|
-
case 1:
|
|
528
|
-
message.result = reader.int32();
|
|
529
|
-
break;
|
|
530
|
-
default:
|
|
531
|
-
reader.skipType(tag & 7);
|
|
532
|
-
break;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
return message;
|
|
536
|
-
},
|
|
537
|
-
fromJSON(object) {
|
|
538
|
-
return { result: isSet(object.result) ? wifiConnectResultFromJSON(object.result) : 0 };
|
|
539
|
-
},
|
|
540
|
-
toJSON(message) {
|
|
541
|
-
const obj = {};
|
|
542
|
-
message.result !== undefined && (obj.result = wifiConnectResultToJSON(message.result));
|
|
543
|
-
return obj;
|
|
544
|
-
},
|
|
545
|
-
fromPartial(object) {
|
|
546
|
-
var _a;
|
|
547
|
-
const message = createBaseWifiConnectReply();
|
|
548
|
-
message.result = (_a = object.result) !== null && _a !== void 0 ? _a : 0;
|
|
549
|
-
return message;
|
|
550
|
-
},
|
|
551
|
-
};
|
|
552
|
-
class NetworkManagerClientImpl {
|
|
553
|
-
constructor(rpc) {
|
|
554
|
-
this.rpc = rpc;
|
|
555
|
-
this.Status = this.Status.bind(this);
|
|
556
|
-
this.WifiScan = this.WifiScan.bind(this);
|
|
557
|
-
this.WifiList = this.WifiList.bind(this);
|
|
558
|
-
this.WifiConnect = this.WifiConnect.bind(this);
|
|
559
|
-
this.WifiConfigAdd = this.WifiConfigAdd.bind(this);
|
|
560
|
-
}
|
|
561
|
-
Status(request, metadata) {
|
|
562
|
-
return this.rpc.unary(exports.NetworkManagerStatusDesc, empty_1.Empty.fromPartial(request), metadata);
|
|
563
|
-
}
|
|
564
|
-
WifiScan(request, metadata) {
|
|
565
|
-
return this.rpc.unary(exports.NetworkManagerWifiScanDesc, empty_1.Empty.fromPartial(request), metadata);
|
|
566
|
-
}
|
|
567
|
-
WifiList(request, metadata) {
|
|
568
|
-
return this.rpc.unary(exports.NetworkManagerWifiListDesc, empty_1.Empty.fromPartial(request), metadata);
|
|
569
|
-
}
|
|
570
|
-
WifiConnect(request, metadata) {
|
|
571
|
-
return this.rpc.unary(exports.NetworkManagerWifiConnectDesc, exports.WifiConnectInfo.fromPartial(request), metadata);
|
|
572
|
-
}
|
|
573
|
-
WifiConfigAdd(request, metadata) {
|
|
574
|
-
return this.rpc.unary(exports.NetworkManagerWifiConfigAddDesc, exports.WifiConfigInfo.fromPartial(request), metadata);
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
exports.NetworkManagerClientImpl = NetworkManagerClientImpl;
|
|
578
|
-
exports.NetworkManagerDesc = { serviceName: "cloud.lazycat.apis.sys.NetworkManager" };
|
|
579
|
-
exports.NetworkManagerStatusDesc = {
|
|
580
|
-
methodName: "Status",
|
|
581
|
-
service: exports.NetworkManagerDesc,
|
|
582
|
-
requestStream: false,
|
|
583
|
-
responseStream: false,
|
|
584
|
-
requestType: {
|
|
585
|
-
serializeBinary() {
|
|
586
|
-
return empty_1.Empty.encode(this).finish();
|
|
587
|
-
},
|
|
588
|
-
},
|
|
589
|
-
responseType: {
|
|
590
|
-
deserializeBinary(data) {
|
|
591
|
-
return Object.assign(Object.assign({}, exports.NetworkDeviceStatusInfo.decode(data)), { toObject() {
|
|
592
|
-
return this;
|
|
593
|
-
} });
|
|
594
|
-
},
|
|
595
|
-
},
|
|
596
|
-
};
|
|
597
|
-
exports.NetworkManagerWifiScanDesc = {
|
|
598
|
-
methodName: "WifiScan",
|
|
599
|
-
service: exports.NetworkManagerDesc,
|
|
600
|
-
requestStream: false,
|
|
601
|
-
responseStream: false,
|
|
602
|
-
requestType: {
|
|
603
|
-
serializeBinary() {
|
|
604
|
-
return empty_1.Empty.encode(this).finish();
|
|
605
|
-
},
|
|
606
|
-
},
|
|
607
|
-
responseType: {
|
|
608
|
-
deserializeBinary(data) {
|
|
609
|
-
return Object.assign(Object.assign({}, empty_1.Empty.decode(data)), { toObject() {
|
|
610
|
-
return this;
|
|
611
|
-
} });
|
|
612
|
-
},
|
|
613
|
-
},
|
|
614
|
-
};
|
|
615
|
-
exports.NetworkManagerWifiListDesc = {
|
|
616
|
-
methodName: "WifiList",
|
|
617
|
-
service: exports.NetworkManagerDesc,
|
|
618
|
-
requestStream: false,
|
|
619
|
-
responseStream: false,
|
|
620
|
-
requestType: {
|
|
621
|
-
serializeBinary() {
|
|
622
|
-
return empty_1.Empty.encode(this).finish();
|
|
623
|
-
},
|
|
624
|
-
},
|
|
625
|
-
responseType: {
|
|
626
|
-
deserializeBinary(data) {
|
|
627
|
-
return Object.assign(Object.assign({}, exports.AccessPointInfoList.decode(data)), { toObject() {
|
|
628
|
-
return this;
|
|
629
|
-
} });
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
};
|
|
633
|
-
exports.NetworkManagerWifiConnectDesc = {
|
|
634
|
-
methodName: "WifiConnect",
|
|
635
|
-
service: exports.NetworkManagerDesc,
|
|
636
|
-
requestStream: false,
|
|
637
|
-
responseStream: false,
|
|
638
|
-
requestType: {
|
|
639
|
-
serializeBinary() {
|
|
640
|
-
return exports.WifiConnectInfo.encode(this).finish();
|
|
641
|
-
},
|
|
642
|
-
},
|
|
643
|
-
responseType: {
|
|
644
|
-
deserializeBinary(data) {
|
|
645
|
-
return Object.assign(Object.assign({}, exports.WifiConnectReply.decode(data)), { toObject() {
|
|
646
|
-
return this;
|
|
647
|
-
} });
|
|
648
|
-
},
|
|
649
|
-
},
|
|
650
|
-
};
|
|
651
|
-
exports.NetworkManagerWifiConfigAddDesc = {
|
|
652
|
-
methodName: "WifiConfigAdd",
|
|
653
|
-
service: exports.NetworkManagerDesc,
|
|
654
|
-
requestStream: false,
|
|
655
|
-
responseStream: false,
|
|
656
|
-
requestType: {
|
|
657
|
-
serializeBinary() {
|
|
658
|
-
return exports.WifiConfigInfo.encode(this).finish();
|
|
659
|
-
},
|
|
660
|
-
},
|
|
661
|
-
responseType: {
|
|
662
|
-
deserializeBinary(data) {
|
|
663
|
-
return Object.assign(Object.assign({}, exports.WifiConnectReply.decode(data)), { toObject() {
|
|
664
|
-
return this;
|
|
665
|
-
} });
|
|
666
|
-
},
|
|
667
|
-
},
|
|
668
|
-
};
|
|
669
|
-
class GrpcWebImpl {
|
|
670
|
-
constructor(host, options) {
|
|
671
|
-
this.host = host;
|
|
672
|
-
this.options = options;
|
|
673
|
-
}
|
|
674
|
-
unary(methodDesc, _request, metadata) {
|
|
675
|
-
var _a;
|
|
676
|
-
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
677
|
-
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
678
|
-
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
679
|
-
: metadata || this.options.metadata;
|
|
680
|
-
return new Promise((resolve, reject) => {
|
|
681
|
-
grpc_web_1.grpc.unary(methodDesc, {
|
|
682
|
-
request,
|
|
683
|
-
host: this.host,
|
|
684
|
-
metadata: maybeCombinedMetadata,
|
|
685
|
-
transport: this.options.transport,
|
|
686
|
-
debug: this.options.debug,
|
|
687
|
-
onEnd: function (response) {
|
|
688
|
-
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
689
|
-
resolve(response.message);
|
|
690
|
-
}
|
|
691
|
-
else {
|
|
692
|
-
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
693
|
-
reject(err);
|
|
694
|
-
}
|
|
695
|
-
},
|
|
696
|
-
});
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
exports.GrpcWebImpl = GrpcWebImpl;
|
|
701
|
-
function isSet(value) {
|
|
702
|
-
return value !== null && value !== undefined;
|
|
703
|
-
}
|
|
704
|
-
class GrpcWebError extends Error {
|
|
705
|
-
constructor(message, code, metadata) {
|
|
706
|
-
super(message);
|
|
707
|
-
this.code = code;
|
|
708
|
-
this.metadata = metadata;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
exports.GrpcWebError = GrpcWebError;
|
|
712
|
-
//# sourceMappingURL=network_manager.js.map
|