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

135 lines · 3624 bytes

  1// This file is generated by "./lib/proto/generate"
  2
  3package proto
  4
  5/*
  6
  7Cast
  8
  9A domain for interacting with Cast, Presentation API, and Remote Playback API
 10functionalities.
 11
 12*/
 13
 14// CastSink ...
 15type CastSink struct {
 16	// Name ...
 17	Name string `json:"name"`
 18
 19	// ID ...
 20	ID string `json:"id"`
 21
 22	// Session (optional) Text describing the current session. Present only if there is an active
 23	// session on the sink.
 24	Session string `json:"session,omitempty"`
 25}
 26
 27// CastEnable Starts observing for sinks that can be used for tab mirroring, and if set,
 28// sinks compatible with |presentationUrl| as well. When sinks are found, a
 29// |sinksUpdated| event is fired.
 30// Also starts observing for issue messages. When an issue is added or removed,
 31// an |issueUpdated| event is fired.
 32type CastEnable struct {
 33	// PresentationURL (optional) ...
 34	PresentationURL string `json:"presentationUrl,omitempty"`
 35}
 36
 37// ProtoReq name.
 38func (m CastEnable) ProtoReq() string { return "Cast.enable" }
 39
 40// Call sends the request.
 41func (m CastEnable) Call(c Client) error {
 42	return call(m.ProtoReq(), m, nil, c)
 43}
 44
 45// CastDisable Stops observing for sinks and issues.
 46type CastDisable struct{}
 47
 48// ProtoReq name.
 49func (m CastDisable) ProtoReq() string { return "Cast.disable" }
 50
 51// Call sends the request.
 52func (m CastDisable) Call(c Client) error {
 53	return call(m.ProtoReq(), m, nil, c)
 54}
 55
 56// CastSetSinkToUse Sets a sink to be used when the web page requests the browser to choose a
 57// sink via Presentation API, Remote Playback API, or Cast SDK.
 58type CastSetSinkToUse struct {
 59	// SinkName ...
 60	SinkName string `json:"sinkName"`
 61}
 62
 63// ProtoReq name.
 64func (m CastSetSinkToUse) ProtoReq() string { return "Cast.setSinkToUse" }
 65
 66// Call sends the request.
 67func (m CastSetSinkToUse) Call(c Client) error {
 68	return call(m.ProtoReq(), m, nil, c)
 69}
 70
 71// CastStartDesktopMirroring Starts mirroring the desktop to the sink.
 72type CastStartDesktopMirroring struct {
 73	// SinkName ...
 74	SinkName string `json:"sinkName"`
 75}
 76
 77// ProtoReq name.
 78func (m CastStartDesktopMirroring) ProtoReq() string { return "Cast.startDesktopMirroring" }
 79
 80// Call sends the request.
 81func (m CastStartDesktopMirroring) Call(c Client) error {
 82	return call(m.ProtoReq(), m, nil, c)
 83}
 84
 85// CastStartTabMirroring Starts mirroring the tab to the sink.
 86type CastStartTabMirroring struct {
 87	// SinkName ...
 88	SinkName string `json:"sinkName"`
 89}
 90
 91// ProtoReq name.
 92func (m CastStartTabMirroring) ProtoReq() string { return "Cast.startTabMirroring" }
 93
 94// Call sends the request.
 95func (m CastStartTabMirroring) Call(c Client) error {
 96	return call(m.ProtoReq(), m, nil, c)
 97}
 98
 99// CastStopCasting Stops the active Cast session on the sink.
100type CastStopCasting struct {
101	// SinkName ...
102	SinkName string `json:"sinkName"`
103}
104
105// ProtoReq name.
106func (m CastStopCasting) ProtoReq() string { return "Cast.stopCasting" }
107
108// Call sends the request.
109func (m CastStopCasting) Call(c Client) error {
110	return call(m.ProtoReq(), m, nil, c)
111}
112
113// CastSinksUpdated This is fired whenever the list of available sinks changes. A sink is a
114// device or a software surface that you can cast to.
115type CastSinksUpdated struct {
116	// Sinks ...
117	Sinks []*CastSink `json:"sinks"`
118}
119
120// ProtoEvent name.
121func (evt CastSinksUpdated) ProtoEvent() string {
122	return "Cast.sinksUpdated"
123}
124
125// CastIssueUpdated This is fired whenever the outstanding issue/error message changes.
126// |issueMessage| is empty if there is no issue.
127type CastIssueUpdated struct {
128	// IssueMessage ...
129	IssueMessage string `json:"issueMessage"`
130}
131
132// ProtoEvent name.
133func (evt CastIssueUpdated) ProtoEvent() string {
134	return "Cast.issueUpdated"
135}