forked from electricbubble/gidevice
-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
springboard.go
53 lines (41 loc) 路 1.11 KB
/
springboard.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
package libimobiledevice
type IconPNGDataResponse struct {
PNGData []byte `plist:"pngData"`
}
type InterfaceOrientationResponse struct {
Orientation OrientationState `plist:"interfaceOrientation"`
}
type OrientationState int64
const (
Unknown OrientationState = iota
Portrait
PortraitUpsideDown
LandscapeRight
LandscapeLeft
)
const (
SpringBoardServiceName = "com.apple.springboardservices"
)
func NewSpringBoardClient(innerConn InnerConn) *SpringBoardClient {
return &SpringBoardClient{
newServicePacketClient(innerConn),
}
}
type SpringBoardClient struct {
client *servicePacketClient
}
func (c *SpringBoardClient) InnerConn() InnerConn {
return c.client.innerConn
}
func (c *SpringBoardClient) NewXmlPacket(req interface{}) (Packet, error) {
return c.client.NewXmlPacket(req)
}
func (c *SpringBoardClient) SendPacket(pkt Packet) (err error) {
return c.client.SendPacket(pkt)
}
func (c *SpringBoardClient) ReceivePacket() (respPkt Packet, err error) {
return c.client.ReceivePacket()
}
func (c *SpringBoardClient) NewBinaryPacket(req interface{}) (Packet, error) {
return c.client.NewBinaryPacket(req)
}