package main //go:generate python3 ../branding/scripts/vendorize.py ../branding/templates/bitmaskvpn/config.go ../branding/config/vendor.conf ../pkg/config/config.go /* a wrapper around bitmask that exposes status to a QtQml gui. Have a look at the pkg/backend module for further enlightment. */ import ( "C" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/backend" ) //export GetVersion func GetVersion() *C.char { return (*C.char)(backend.GetVersion()) } //export GetAppName func GetAppName() *C.char { return (*C.char)(backend.GetAppName()) } //export SwitchOn func SwitchOn() { backend.SwitchOn() } //export SwitchOff func SwitchOff() { backend.SwitchOff() } //export Quit func Quit() { backend.Quit() } //export DonateAccepted func DonateAccepted() { backend.DonateAccepted() } //export SubscribeToEvent func SubscribeToEvent(event string, f unsafe.Pointer) { backend.SubscribeToEvent(event, f) } //export InitializeBitmaskContext func InitializeBitmaskContext() { opts := &backend.InitOpts{} backend.InitializeBitmaskContext(opts) } //export InitializeTestBitmaskContext func InitializeTestBitmaskContext() { opts := &backend.InitOpts{} opts.SkipLaunch = true backend.InitializeBitmaskContext(opts) backend.EnableMockBackend() } //export EnableWebAPI func EnableWebAPI(port string) { backend.EnableWebAPI(port) } //export RefreshContext func RefreshContext() *C.char { return (*C.char)(backend.RefreshContext()) } //export InstallHelpers func InstallHelpers() { backend.InstallHelpers() } func main() {}