engine

package
v0.0.0-...-3226cea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StableApplicationID = "io.safing.portmaster.android"
	BetaApplicationID   = "io.safing.portmaster.android.beta"
)

Variables

View Source
var (
	IsCurrentNetworkNotMetered abool.AtomicBool
)
View Source
var NET_CAPABILITY_NOT_METERED int32 = 11
View Source
var (
	NewApkVersion abool.AtomicBool
)

Functions

func CancelAllUISubscriptions

func CancelAllUISubscriptions()

func DownloadUpdates

func DownloadUpdates()

func DownloadUpdatesOnWifiConnected

func DownloadUpdatesOnWifiConnected()

func IsEngineInitialized

func IsEngineInitialized() bool

func IsGeoIPDataAvailable

func IsGeoIPDataAvailable() (bool, error)

func NotifiOnNotMeterdNetwork

func NotifiOnNotMeterdNetwork() <-chan struct{}

func OnActivityDestroy

func OnActivityDestroy()

func OnCreate

func OnCreate(appDir string)

func OnDestroy

func OnDestroy()

OnDestroy shutdown module system and calls System.exit(0)

func OnIdleModeChanged

func OnIdleModeChanged(isOnIdleMode bool)

OnIdleModeChanged is called from java when device switches from or to idle mode.

func OnNetworkCapabilitiesChanged

func OnNetworkCapabilitiesChanged(network Network)

OnNetworkConnected called from java when a network interface changes some of its properties.

func OnNetworkConnected

func OnNetworkConnected()

OnNetworkConnected called from java when new network interface is connected.

func OnNetworkDisconnected

func OnNetworkDisconnected()

OnNetworkConnected called from java when a network interface is disconnected.

func OnServiceDestroy

func OnServiceDestroy()

func RemoveSubscription

func RemoveSubscription(eventID string)

func SetActivityFunctions

func SetActivityFunctions(functions app_interface.AppInterface)

func SetOSFunctions

func SetOSFunctions(functions app_interface.AppInterface)

func SetServiceFunctions

func SetServiceFunctions(functions app_interface.AppInterface)

func UISubscribeRequest

func UISubscribeRequest(req *SubscribeRequest)

Types

type Network

type Network interface {
	HasCapability(int32) bool
}

type PluginCall

type PluginCall interface {
	Resolve()
	ResolveJson(obj string)
	Error(err string)
	GetArgs() string
	GetInt(name string) (int32, error)
	GetLong(name string) (int64, error)
	GetFloat(name string) (float32, error)
	GetString(name string) (string, error)
	GetBool(name string) (bool, error)
	Notify(eventName string, data string) error
	KeepAlive(keepAlive bool)
}

type SubscribeRequest

type SubscribeRequest struct {
	EventName string
	Query     string
	Call      PluginCall
}

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL