V23GoRunner -> VAnGo
MultiPart: 1/2
Change-Id: Ie0875c4e20488a8353c85abec0f7465d32319e6e
diff --git a/impl/google/services/jni.go b/impl/google/services/jni.go
index 365da10..49b11bb 100644
--- a/impl/google/services/jni.go
+++ b/impl/google/services/jni.go
@@ -10,7 +10,7 @@
jgroups "v.io/x/jni/impl/google/services/groups"
jmounttable "v.io/x/jni/impl/google/services/mounttable"
jsyncbase "v.io/x/jni/impl/google/services/syncbase"
- _ "v.io/x/jni/impl/google/services/v23_go_runner"
+ _ "v.io/x/jni/impl/google/services/vango"
jutil "v.io/x/jni/util"
)
diff --git a/impl/google/services/v23_go_runner/funcs.go b/impl/google/services/vango/funcs.go
similarity index 91%
rename from impl/google/services/v23_go_runner/funcs.go
rename to impl/google/services/vango/funcs.go
index 50c5661..48ebb0f 100644
--- a/impl/google/services/v23_go_runner/funcs.go
+++ b/impl/google/services/vango/funcs.go
@@ -4,7 +4,7 @@
// +build java android
-package v23_go_runner
+package vango
import (
"fmt"
@@ -26,11 +26,11 @@
Protocol: "ble",
}.Name()
-// v23GoRunnerFuncs is a map containing go functions keys by unique strings
-// intended to be run by java/android applications using V23GoRunner.run(key).
+// vangoFuncs is a map containing go functions keys by unique strings
+// intended to be run by java/android applications using Vango.run(key).
// Users must add function entries to this map and rebuild lib/android-lib in
// the vanadium java repository.
-var v23GoRunnerFuncs = map[string]func(*context.T) error{
+var vangoFuncs = map[string]func(*context.T) error{
"tcp-server": tcpServerFunc,
"tcp-client": tcpClientFunc,
"bt-client": btClientFunc,
diff --git a/impl/google/services/v23_go_runner/jni.go b/impl/google/services/vango/jni.go
similarity index 66%
rename from impl/google/services/v23_go_runner/jni.go
rename to impl/google/services/vango/jni.go
index ce53c32..8f20080 100644
--- a/impl/google/services/v23_go_runner/jni.go
+++ b/impl/google/services/vango/jni.go
@@ -4,7 +4,7 @@
// +build java android
-package v23_go_runner
+package vango
import (
"fmt"
@@ -17,8 +17,8 @@
// #include "jni.h"
import "C"
-//export Java_io_v_android_util_V23GoRunner_nativeGoContextCall
-func Java_io_v_android_util_V23GoRunner_nativeGoContextCall(jenv *C.JNIEnv, jV23GoRunner C.jobject, jContext C.jobject, jKey C.jstring) {
+//export Java_io_v_android_util_Vango_nativeGoContextCall
+func Java_io_v_android_util_Vango_nativeGoContextCall(jenv *C.JNIEnv, jVango C.jobject, jContext C.jobject, jKey C.jstring) {
env := jutil.Env(uintptr(unsafe.Pointer(jenv)))
key := jutil.GoString(env, jutil.Object(uintptr(unsafe.Pointer(jKey))))
ctx, _, err := jcontext.GoContext(env, jutil.Object(uintptr(unsafe.Pointer(jContext))))
@@ -26,9 +26,9 @@
jutil.JThrowV(env, err)
return
}
- f, ok := v23GoRunnerFuncs[key]
+ f, ok := vangoFuncs[key]
if !ok {
- jutil.JThrowV(env, fmt.Errorf("v23GoRunnerFunc key %q doesn't exist", key))
+ jutil.JThrowV(env, fmt.Errorf("vangoFunc key %q doesn't exist", key))
return
}
if err := f(ctx); err != nil {
diff --git a/impl/google/services/v23_go_runner/util.go b/impl/google/services/vango/util.go
similarity index 95%
rename from impl/google/services/v23_go_runner/util.go
rename to impl/google/services/vango/util.go
index 98191c6..19887a1 100644
--- a/impl/google/services/v23_go_runner/util.go
+++ b/impl/google/services/vango/util.go
@@ -4,7 +4,7 @@
// +build java android
-package v23_go_runner
+package vango
import (
"v.io/v23/context"