vendor/github.com/go-rod/rod/lib/proto/tethering.go

53 lines · 1224 bytes

 1// This file is generated by "./lib/proto/generate"
 2
 3package proto
 4
 5/*
 6
 7Tethering
 8
 9The Tethering domain defines methods and events for browser port binding.
10
11*/
12
13// TetheringBind Request browser port binding.
14type TetheringBind struct {
15	// Port number to bind.
16	Port int `json:"port"`
17}
18
19// ProtoReq name.
20func (m TetheringBind) ProtoReq() string { return "Tethering.bind" }
21
22// Call sends the request.
23func (m TetheringBind) Call(c Client) error {
24	return call(m.ProtoReq(), m, nil, c)
25}
26
27// TetheringUnbind Request browser port unbinding.
28type TetheringUnbind struct {
29	// Port number to unbind.
30	Port int `json:"port"`
31}
32
33// ProtoReq name.
34func (m TetheringUnbind) ProtoReq() string { return "Tethering.unbind" }
35
36// Call sends the request.
37func (m TetheringUnbind) Call(c Client) error {
38	return call(m.ProtoReq(), m, nil, c)
39}
40
41// TetheringAccepted Informs that port was successfully bound and got a specified connection id.
42type TetheringAccepted struct {
43	// Port number that was successfully bound.
44	Port int `json:"port"`
45
46	// ConnectionID Connection id to be used.
47	ConnectionID string `json:"connectionId"`
48}
49
50// ProtoEvent name.
51func (evt TetheringAccepted) ProtoEvent() string {
52	return "Tethering.accepted"
53}