forked from dryark/ios_remote_provider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbridge_interface.go
54 lines (45 loc) · 1.08 KB
/
bridge_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"fmt"
uj "github.com/nanoscopic/ujsonin/v2/mod"
)
type TunPair struct {
from int
to int
}
func (self TunPair) String() string {
return fmt.Sprintf("%d:%d",self.from,self.to)
}
type Screenshot struct {
format string
data []byte
}
type BridgeDevInfo struct {
udid string
}
// detect( onDevConnect func( bridge CliBridge ) )
type BridgeRoot interface {
//OnConnect( dev BridgeDev )
//OnDisconnect( dev BridgeDev )
list() []BridgeDevInfo
}
type iProc struct {
pid int32
name string
}
type BridgeDev interface {
getUdid() string
tunnel( pairs []TunPair )
info( names []string ) map[string]string
gestalt( names []string ) map[string]string
ps() []iProc
screenshot() Screenshot
wda( name string, port int, onStart func(), onStop func(interface{}) )
destroy()
setProcTracker( procTracker ProcTracker )
NewBackupVideo( port int, onStop func( interface{} ) ) ( *BackupVideo )
GetPid( appname string ) int
AppInfo( bundleId string ) uj.JNode
InstallApp( appPath string ) bool
NewSyslogMonitor( handleLogItem func( uj.JNode ) )
}