xfuture 1.1.1 → 1.1.2

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/index.js CHANGED
@@ -1,29 +1,59 @@
1
- let LVRTCEngineNativePath = "";
1
+ let xFuturePath = "";
2
2
  let os = require("os");
3
3
  var isMac = true;
4
4
  if (os.platform() === "win32") {
5
- LVRTCEngineNativePath = "./package/win/xFuture";
5
+ xFuturePath = "./package/win/xFuture";
6
6
  isMac = false;
7
7
  } else if (os.platform() === "darwin") {
8
- LVRTCEngineNativePath = "./package/mac/xFuture"
8
+ xFuturePath = "./package/mac/xFuture"
9
9
  } else {
10
10
  throw ("Platform not supported")
11
11
  }
12
12
 
13
- const RTC = require(LVRTCEngineNativePath);
13
+ const ff = require(xFuturePath);
14
14
 
15
15
  class xFuture {
16
16
 
17
- SetupURL(url){
18
- return RTC.SetupURL(url);
17
+ StartTunnel(url){
18
+ return ff.StartTunnel(url);
19
19
  }
20
20
 
21
- Install(shell_path, helper_path){
22
- return RTC.Install(shell_path, helper_path);
21
+ StopTunnel(){
22
+ ff.StopTunnel();
23
23
  }
24
24
 
25
- Close() {
26
- return RTC.Close();
25
+ ChangeURL(url){
26
+ ff.ChangeURL(url);
27
+ }
28
+
29
+ SetGlobalMode(isGlobalMode){
30
+ ff.SetGlobalMode(isGlobalMode);
31
+ }
32
+
33
+ InstallDriver(shell_path, helper_path){
34
+ return ff.InstallDriver(shell_path, helper_path);
35
+ }
36
+
37
+ GetCurrentStatus(){
38
+ return ff.GetCurrentStatus();
39
+ }
40
+
41
+ GetCurrentURI(){
42
+ return ff.GetCurrentURI();
43
+ }
44
+
45
+ /**
46
+ *
47
+ * @param {事件名称} name
48
+ * @param {函数回调} func
49
+ *
50
+ * K_IDEL = 0; K_Connecting = 1;K_Connected = 2; K_Disconnected = 3;
51
+ * connectionStatusDidChange: function(status) {}
52
+ *
53
+ *
54
+ */
55
+ SetEventCallback(name, func){
56
+ ff.SetEventCallback(name, func);
27
57
  }
28
58
  }
29
59
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xfuture",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "electron vpn sdk",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,8 @@
23
23
  "package/mac/xfuture_helper",
24
24
  "package/mac/install_helper.sh",
25
25
  "index.js",
26
- "package.json"
26
+ "package.json",
27
+ "xFuture.framework"
27
28
  ],
28
29
  "build": {
29
30
  "mac": {
@@ -31,8 +32,7 @@
31
32
  "entitlementsInherit": "build/entitlements.mac.plist",
32
33
  "extendInfo": {
33
34
  "NSMicrophoneUsageDescription": "I need access to your microphone to send your voice to others in the session room.",
34
- "NSCameraUsageDescription": "I need access to your camera so that others can see you in the session room.",
35
- "logToStdErr": true
35
+ "NSCameraUsageDescription": "I need access to your camera so that others can see you in the session room."
36
36
  }
37
37
  }
38
38
  }