wifidirectplugin 1.2.7 → 1.2.9
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/README.md +80 -0
- package/android/src/main/java/com/ht/plugins/wifidirect/WifiDirectPlugin.java +77 -3
- package/dist/docs.json +103 -1
- package/dist/esm/definitions.d.ts +23 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +17 -0
- package/dist/esm/web.js +15 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +15 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +15 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,12 @@ npx cap sync
|
|
|
14
14
|
<docgen-index>
|
|
15
15
|
|
|
16
16
|
* [`echo(...)`](#echo)
|
|
17
|
+
* [`scanWifiPeers(...)`](#scanwifipeers)
|
|
18
|
+
* [`connectToDevice(...)`](#connecttodevice)
|
|
19
|
+
* [`getGroupOwnerAddress()`](#getgroupowneraddress)
|
|
20
|
+
* [`getNetworkBand()`](#getnetworkband)
|
|
21
|
+
* [`disconnect()`](#disconnect)
|
|
22
|
+
* [Interfaces](#interfaces)
|
|
17
23
|
|
|
18
24
|
</docgen-index>
|
|
19
25
|
|
|
@@ -34,4 +40,78 @@ echo(options: { value: string; }) => Promise<{ value: string; }>
|
|
|
34
40
|
|
|
35
41
|
--------------------
|
|
36
42
|
|
|
43
|
+
|
|
44
|
+
### scanWifiPeers(...)
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
scanWifiPeers(options: { deviceName?: string; }) => Promise<{ devices: WifiP2pDevice[]; }>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
| Param | Type |
|
|
51
|
+
| ------------- | ------------------------------------- |
|
|
52
|
+
| **`options`** | <code>{ deviceName?: string; }</code> |
|
|
53
|
+
|
|
54
|
+
**Returns:** <code>Promise<{ devices: WifiP2pDevice[]; }></code>
|
|
55
|
+
|
|
56
|
+
--------------------
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### connectToDevice(...)
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
connectToDevice(options: { deviceAddress: string; }) => Promise<void>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
| Param | Type |
|
|
66
|
+
| ------------- | --------------------------------------- |
|
|
67
|
+
| **`options`** | <code>{ deviceAddress: string; }</code> |
|
|
68
|
+
|
|
69
|
+
--------------------
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### getGroupOwnerAddress()
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
getGroupOwnerAddress() => Promise<{ Ip: string; }>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Returns:** <code>Promise<{ Ip: string; }></code>
|
|
79
|
+
|
|
80
|
+
--------------------
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### getNetworkBand()
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
getNetworkBand() => Promise<{ band: number; }>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Returns:** <code>Promise<{ band: number; }></code>
|
|
90
|
+
|
|
91
|
+
--------------------
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### disconnect()
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
disconnect() => Promise<{ disconnected: boolean; }>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Returns:** <code>Promise<{ disconnected: boolean; }></code>
|
|
101
|
+
|
|
102
|
+
--------------------
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Interfaces
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
#### WifiP2pDevice
|
|
109
|
+
|
|
110
|
+
| Prop | Type |
|
|
111
|
+
| ------------------- | -------------------- |
|
|
112
|
+
| **`deviceName`** | <code>string</code> |
|
|
113
|
+
| **`deviceAddress`** | <code>string</code> |
|
|
114
|
+
| **`status`** | <code>number</code> |
|
|
115
|
+
| **`connected`** | <code>boolean</code> |
|
|
116
|
+
|
|
37
117
|
</docgen-api>
|
|
@@ -184,20 +184,17 @@ public class WifiDirectPlugin extends Plugin {
|
|
|
184
184
|
public void onSuccess() {
|
|
185
185
|
Log.d(TAG, "connect onSuccess Called");
|
|
186
186
|
call.resolve();
|
|
187
|
-
// unload();
|
|
188
187
|
}
|
|
189
188
|
|
|
190
189
|
@Override
|
|
191
190
|
public void onFailure(int reason) {
|
|
192
191
|
Log.e(TAG, "connect onFailure Called");
|
|
193
192
|
call.reject("Connection failed: " + reason);
|
|
194
|
-
// unload();
|
|
195
193
|
}
|
|
196
194
|
});
|
|
197
195
|
} catch (Exception e) {
|
|
198
196
|
Log.e(TAG, "connect exception", e);
|
|
199
197
|
call.reject("Connection exception: " + e.getMessage());
|
|
200
|
-
// unload();
|
|
201
198
|
}
|
|
202
199
|
}
|
|
203
200
|
|
|
@@ -215,4 +212,81 @@ public class WifiDirectPlugin extends Plugin {
|
|
|
215
212
|
});
|
|
216
213
|
}
|
|
217
214
|
|
|
215
|
+
@PluginMethod
|
|
216
|
+
public void getNetworkBand(PluginCall call) {
|
|
217
|
+
if (manager == null || channel == null) {
|
|
218
|
+
Log.e(TAG, "WifiP2pManager or Channel is null");
|
|
219
|
+
call.reject("WifiP2pManager or Channel not initialized");
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
manager.requestConnectionInfo(channel, wifiP2pInfo -> {
|
|
224
|
+
if (wifiP2pInfo == null || !wifiP2pInfo.groupFormed) {
|
|
225
|
+
call.reject("No Wi-Fi P2P group formed");
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
String ip = wifiP2pInfo.groupOwnerAddress.getHostAddress();
|
|
230
|
+
Log.d(TAG, "getNetworkBand - groupOwnerAddress: " + ip);
|
|
231
|
+
|
|
232
|
+
int band = -1;
|
|
233
|
+
if (ip != null) {
|
|
234
|
+
String[] parts = ip.split("\\.");
|
|
235
|
+
if (parts.length == 4) {
|
|
236
|
+
try {
|
|
237
|
+
int thirdOctet = Integer.parseInt(parts[2]);
|
|
238
|
+
if (thirdOctet == 20 || thirdOctet == 50) {
|
|
239
|
+
band = thirdOctet;
|
|
240
|
+
}
|
|
241
|
+
} catch (NumberFormatException e) {
|
|
242
|
+
Log.e(TAG, "Failed to parse IP octet: " + e.getMessage());
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (band == -1) {
|
|
248
|
+
call.reject("Unknown network band for IP: " + ip);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
JSObject ret = new JSObject();
|
|
253
|
+
ret.put("band", band);
|
|
254
|
+
call.resolve(ret);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@PluginMethod
|
|
259
|
+
public void disconnect(PluginCall call) {
|
|
260
|
+
if (manager == null || channel == null) {
|
|
261
|
+
Log.e(TAG, "WifiP2pManager or Channel is null");
|
|
262
|
+
call.reject("WifiP2pManager or Channel not initialized");
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
manager.requestConnectionInfo(channel, info -> {
|
|
267
|
+
if (info != null && info.groupFormed) {
|
|
268
|
+
Log.d(TAG, "Wi-Fi Direct group found. Removing group.");
|
|
269
|
+
manager.removeGroup(channel, new WifiP2pManager.ActionListener() {
|
|
270
|
+
@Override
|
|
271
|
+
public void onSuccess() {
|
|
272
|
+
Log.d(TAG, "removeGroup success, disconnected.");
|
|
273
|
+
JSObject ret = new JSObject();
|
|
274
|
+
ret.put("disconnected", true);
|
|
275
|
+
call.resolve(ret);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@Override
|
|
279
|
+
public void onFailure(int reason) {
|
|
280
|
+
Log.e(TAG, "removeGroup failed: " + reason);
|
|
281
|
+
call.reject("Failed to remove group: " + reason);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
} else {
|
|
285
|
+
Log.d(TAG, "No Wi-Fi Direct group to remove.");
|
|
286
|
+
call.reject("No Wi-Fi P2P group formed");
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
|
|
218
292
|
}
|
package/dist/docs.json
CHANGED
|
@@ -20,11 +20,113 @@
|
|
|
20
20
|
"docs": "",
|
|
21
21
|
"complexTypes": [],
|
|
22
22
|
"slug": "echo"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "scanWifiPeers",
|
|
26
|
+
"signature": "(options: { deviceName?: string; }) => Promise<{ devices: WifiP2pDevice[]; }>",
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "options",
|
|
30
|
+
"docs": "",
|
|
31
|
+
"type": "{ deviceName?: string | undefined; }"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"returns": "Promise<{ devices: WifiP2pDevice[]; }>",
|
|
35
|
+
"tags": [],
|
|
36
|
+
"docs": "",
|
|
37
|
+
"complexTypes": [
|
|
38
|
+
"WifiP2pDevice"
|
|
39
|
+
],
|
|
40
|
+
"slug": "scanwifipeers"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "connectToDevice",
|
|
44
|
+
"signature": "(options: { deviceAddress: string; }) => Promise<void>",
|
|
45
|
+
"parameters": [
|
|
46
|
+
{
|
|
47
|
+
"name": "options",
|
|
48
|
+
"docs": "",
|
|
49
|
+
"type": "{ deviceAddress: string; }"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"returns": "Promise<void>",
|
|
53
|
+
"tags": [],
|
|
54
|
+
"docs": "",
|
|
55
|
+
"complexTypes": [],
|
|
56
|
+
"slug": "connecttodevice"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "getGroupOwnerAddress",
|
|
60
|
+
"signature": "() => Promise<{ Ip: string; }>",
|
|
61
|
+
"parameters": [],
|
|
62
|
+
"returns": "Promise<{ Ip: string; }>",
|
|
63
|
+
"tags": [],
|
|
64
|
+
"docs": "",
|
|
65
|
+
"complexTypes": [],
|
|
66
|
+
"slug": "getgroupowneraddress"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "getNetworkBand",
|
|
70
|
+
"signature": "() => Promise<{ band: number; }>",
|
|
71
|
+
"parameters": [],
|
|
72
|
+
"returns": "Promise<{ band: number; }>",
|
|
73
|
+
"tags": [],
|
|
74
|
+
"docs": "",
|
|
75
|
+
"complexTypes": [],
|
|
76
|
+
"slug": "getnetworkband"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "disconnect",
|
|
80
|
+
"signature": "() => Promise<{ disconnected: boolean; }>",
|
|
81
|
+
"parameters": [],
|
|
82
|
+
"returns": "Promise<{ disconnected: boolean; }>",
|
|
83
|
+
"tags": [],
|
|
84
|
+
"docs": "",
|
|
85
|
+
"complexTypes": [],
|
|
86
|
+
"slug": "disconnect"
|
|
23
87
|
}
|
|
24
88
|
],
|
|
25
89
|
"properties": []
|
|
26
90
|
},
|
|
27
|
-
"interfaces": [
|
|
91
|
+
"interfaces": [
|
|
92
|
+
{
|
|
93
|
+
"name": "WifiP2pDevice",
|
|
94
|
+
"slug": "wifip2pdevice",
|
|
95
|
+
"docs": "",
|
|
96
|
+
"tags": [],
|
|
97
|
+
"methods": [],
|
|
98
|
+
"properties": [
|
|
99
|
+
{
|
|
100
|
+
"name": "deviceName",
|
|
101
|
+
"tags": [],
|
|
102
|
+
"docs": "",
|
|
103
|
+
"complexTypes": [],
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "deviceAddress",
|
|
108
|
+
"tags": [],
|
|
109
|
+
"docs": "",
|
|
110
|
+
"complexTypes": [],
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "status",
|
|
115
|
+
"tags": [],
|
|
116
|
+
"docs": "",
|
|
117
|
+
"complexTypes": [],
|
|
118
|
+
"type": "number"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "connected",
|
|
122
|
+
"tags": [],
|
|
123
|
+
"docs": "",
|
|
124
|
+
"complexTypes": [],
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
28
130
|
"enums": [],
|
|
29
131
|
"typeAliases": [],
|
|
30
132
|
"pluginConfigs": []
|
|
@@ -4,4 +4,27 @@ export interface WifiDirectPlugin {
|
|
|
4
4
|
}): Promise<{
|
|
5
5
|
value: string;
|
|
6
6
|
}>;
|
|
7
|
+
scanWifiPeers(options: {
|
|
8
|
+
deviceName?: string;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
devices: WifiP2pDevice[];
|
|
11
|
+
}>;
|
|
12
|
+
connectToDevice(options: {
|
|
13
|
+
deviceAddress: string;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
getGroupOwnerAddress(): Promise<{
|
|
16
|
+
Ip: string;
|
|
17
|
+
}>;
|
|
18
|
+
getNetworkBand(): Promise<{
|
|
19
|
+
band: number;
|
|
20
|
+
}>;
|
|
21
|
+
disconnect(): Promise<{
|
|
22
|
+
disconnected: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface WifiP2pDevice {
|
|
26
|
+
deviceName: string;
|
|
27
|
+
deviceAddress: string;
|
|
28
|
+
status: number;
|
|
29
|
+
connected: boolean;
|
|
7
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface WifiDirectPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface WifiDirectPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n scanWifiPeers(options: { deviceName?: string }): Promise<{ devices: WifiP2pDevice[] }>;\n connectToDevice(options: { deviceAddress: string }): Promise<void>;\n getGroupOwnerAddress(): Promise<{ Ip: string }>;\n getNetworkBand(): Promise<{ band: number }>;\n disconnect(): Promise<{ disconnected: boolean }>;\n}\n\nexport interface WifiP2pDevice {\n deviceName: string;\n deviceAddress: string;\n status: number;\n connected: boolean;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -6,4 +6,21 @@ export declare class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin
|
|
|
6
6
|
}): Promise<{
|
|
7
7
|
value: string;
|
|
8
8
|
}>;
|
|
9
|
+
scanWifiPeers(_options: {
|
|
10
|
+
deviceName?: string;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
devices: any[];
|
|
13
|
+
}>;
|
|
14
|
+
connectToDevice(_options: {
|
|
15
|
+
deviceAddress: string;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
getGroupOwnerAddress(): Promise<{
|
|
18
|
+
Ip: string;
|
|
19
|
+
}>;
|
|
20
|
+
getNetworkBand(): Promise<{
|
|
21
|
+
band: number;
|
|
22
|
+
}>;
|
|
23
|
+
disconnect(): Promise<{
|
|
24
|
+
disconnected: boolean;
|
|
25
|
+
}>;
|
|
9
26
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -4,5 +4,20 @@ export class WifiDirectWeb extends WebPlugin {
|
|
|
4
4
|
console.log('ECHO', options);
|
|
5
5
|
return options;
|
|
6
6
|
}
|
|
7
|
+
async scanWifiPeers(_options) {
|
|
8
|
+
throw this.unimplemented('Not available on web.');
|
|
9
|
+
}
|
|
10
|
+
async connectToDevice(_options) {
|
|
11
|
+
throw this.unimplemented('Not available on web.');
|
|
12
|
+
}
|
|
13
|
+
async getGroupOwnerAddress() {
|
|
14
|
+
throw this.unimplemented('Not available on web.');
|
|
15
|
+
}
|
|
16
|
+
async getNetworkBand() {
|
|
17
|
+
throw this.unimplemented('Not available on web.');
|
|
18
|
+
}
|
|
19
|
+
async disconnect() {
|
|
20
|
+
throw this.unimplemented('Not available on web.');
|
|
21
|
+
}
|
|
7
22
|
}
|
|
8
23
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { WifiDirectPlugin } from './definitions';\n\nexport class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,QAAiC;QACnD,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAmC;QACvD,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,oBAAoB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { WifiDirectPlugin } from './definitions';\n\nexport class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async scanWifiPeers(_options: { deviceName?: string }): Promise<{ devices: any[] }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async connectToDevice(_options: { deviceAddress: string }): Promise<void> {\n throw this.unimplemented('Not available on web.');\n }\n\n async getGroupOwnerAddress(): Promise<{ Ip: string }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async getNetworkBand(): Promise<{ band: number }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async disconnect(): Promise<{ disconnected: boolean }> {\n throw this.unimplemented('Not available on web.');\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -11,6 +11,21 @@ class WifiDirectWeb extends core.WebPlugin {
|
|
|
11
11
|
console.log('ECHO', options);
|
|
12
12
|
return options;
|
|
13
13
|
}
|
|
14
|
+
async scanWifiPeers(_options) {
|
|
15
|
+
throw this.unimplemented('Not available on web.');
|
|
16
|
+
}
|
|
17
|
+
async connectToDevice(_options) {
|
|
18
|
+
throw this.unimplemented('Not available on web.');
|
|
19
|
+
}
|
|
20
|
+
async getGroupOwnerAddress() {
|
|
21
|
+
throw this.unimplemented('Not available on web.');
|
|
22
|
+
}
|
|
23
|
+
async getNetworkBand() {
|
|
24
|
+
throw this.unimplemented('Not available on web.');
|
|
25
|
+
}
|
|
26
|
+
async disconnect() {
|
|
27
|
+
throw this.unimplemented('Not available on web.');
|
|
28
|
+
}
|
|
14
29
|
}
|
|
15
30
|
|
|
16
31
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB,IAAI;AACJ;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async scanWifiPeers(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async connectToDevice(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async getGroupOwnerAddress() {\n throw this.unimplemented('Not available on web.');\n }\n async getNetworkBand() {\n throw this.unimplemented('Not available on web.');\n }\n async disconnect() {\n throw this.unimplemented('Not available on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB,IAAI;AACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;AAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -10,6 +10,21 @@ var capacitorWifiDirect = (function (exports, core) {
|
|
|
10
10
|
console.log('ECHO', options);
|
|
11
11
|
return options;
|
|
12
12
|
}
|
|
13
|
+
async scanWifiPeers(_options) {
|
|
14
|
+
throw this.unimplemented('Not available on web.');
|
|
15
|
+
}
|
|
16
|
+
async connectToDevice(_options) {
|
|
17
|
+
throw this.unimplemented('Not available on web.');
|
|
18
|
+
}
|
|
19
|
+
async getGroupOwnerAddress() {
|
|
20
|
+
throw this.unimplemented('Not available on web.');
|
|
21
|
+
}
|
|
22
|
+
async getNetworkBand() {
|
|
23
|
+
throw this.unimplemented('Not available on web.');
|
|
24
|
+
}
|
|
25
|
+
async disconnect() {
|
|
26
|
+
throw this.unimplemented('Not available on web.');
|
|
27
|
+
}
|
|
13
28
|
}
|
|
14
29
|
|
|
15
30
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async scanWifiPeers(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async connectToDevice(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async getGroupOwnerAddress() {\n throw this.unimplemented('Not available on web.');\n }\n async getNetworkBand() {\n throw this.unimplemented('Not available on web.');\n }\n async disconnect() {\n throw this.unimplemented('Not available on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB,IAAI;IACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;IAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;IACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ;;;;;;;;;;;;;;;"}
|