vendor/github.com/go-rod/rod/lib/proto/system_info.go
232 lines · 8340 bytes
1// This file is generated by "./lib/proto/generate"
2
3package proto
4
5import (
6 "github.com/ysmood/gson"
7)
8
9/*
10
11SystemInfo
12
13The SystemInfo domain defines methods and events for querying low-level system information.
14
15*/
16
17// SystemInfoGPUDevice Describes a single graphics processor (GPU).
18type SystemInfoGPUDevice struct {
19 // VendorID PCI ID of the GPU vendor, if available; 0 otherwise.
20 VendorID float64 `json:"vendorId"`
21
22 // DeviceID PCI ID of the GPU device, if available; 0 otherwise.
23 DeviceID float64 `json:"deviceId"`
24
25 // SubSysID (optional) Sub sys ID of the GPU, only available on Windows.
26 SubSysID *float64 `json:"subSysId,omitempty"`
27
28 // Revision (optional) Revision of the GPU, only available on Windows.
29 Revision *float64 `json:"revision,omitempty"`
30
31 // VendorString String description of the GPU vendor, if the PCI ID is not available.
32 VendorString string `json:"vendorString"`
33
34 // DeviceString String description of the GPU device, if the PCI ID is not available.
35 DeviceString string `json:"deviceString"`
36
37 // DriverVendor String description of the GPU driver vendor.
38 DriverVendor string `json:"driverVendor"`
39
40 // DriverVersion String description of the GPU driver version.
41 DriverVersion string `json:"driverVersion"`
42}
43
44// SystemInfoSize Describes the width and height dimensions of an entity.
45type SystemInfoSize struct {
46 // Width in pixels.
47 Width int `json:"width"`
48
49 // Height in pixels.
50 Height int `json:"height"`
51}
52
53// SystemInfoVideoDecodeAcceleratorCapability Describes a supported video decoding profile with its associated minimum and
54// maximum resolutions.
55type SystemInfoVideoDecodeAcceleratorCapability struct {
56 // Profile Video codec profile that is supported, e.g. VP9 Profile 2.
57 Profile string `json:"profile"`
58
59 // MaxResolution Maximum video dimensions in pixels supported for this |profile|.
60 MaxResolution *SystemInfoSize `json:"maxResolution"`
61
62 // MinResolution Minimum video dimensions in pixels supported for this |profile|.
63 MinResolution *SystemInfoSize `json:"minResolution"`
64}
65
66// SystemInfoVideoEncodeAcceleratorCapability Describes a supported video encoding profile with its associated maximum
67// resolution and maximum framerate.
68type SystemInfoVideoEncodeAcceleratorCapability struct {
69 // Profile Video codec profile that is supported, e.g H264 Main.
70 Profile string `json:"profile"`
71
72 // MaxResolution Maximum video dimensions in pixels supported for this |profile|.
73 MaxResolution *SystemInfoSize `json:"maxResolution"`
74
75 // MaxFramerateNumerator Maximum encoding framerate in frames per second supported for this
76 // |profile|, as fraction's numerator and denominator, e.g. 24/1 fps,
77 // 24000/1001 fps, etc.
78 MaxFramerateNumerator int `json:"maxFramerateNumerator"`
79
80 // MaxFramerateDenominator ...
81 MaxFramerateDenominator int `json:"maxFramerateDenominator"`
82}
83
84// SystemInfoSubsamplingFormat YUV subsampling type of the pixels of a given image.
85type SystemInfoSubsamplingFormat string
86
87const (
88 // SystemInfoSubsamplingFormatYuv420 enum const.
89 SystemInfoSubsamplingFormatYuv420 SystemInfoSubsamplingFormat = "yuv420"
90
91 // SystemInfoSubsamplingFormatYuv422 enum const.
92 SystemInfoSubsamplingFormatYuv422 SystemInfoSubsamplingFormat = "yuv422"
93
94 // SystemInfoSubsamplingFormatYuv444 enum const.
95 SystemInfoSubsamplingFormatYuv444 SystemInfoSubsamplingFormat = "yuv444"
96)
97
98// SystemInfoImageType Image format of a given image.
99type SystemInfoImageType string
100
101const (
102 // SystemInfoImageTypeJpeg enum const.
103 SystemInfoImageTypeJpeg SystemInfoImageType = "jpeg"
104
105 // SystemInfoImageTypeWebp enum const.
106 SystemInfoImageTypeWebp SystemInfoImageType = "webp"
107
108 // SystemInfoImageTypeUnknown enum const.
109 SystemInfoImageTypeUnknown SystemInfoImageType = "unknown"
110)
111
112// SystemInfoImageDecodeAcceleratorCapability Describes a supported image decoding profile with its associated minimum and
113// maximum resolutions and subsampling.
114type SystemInfoImageDecodeAcceleratorCapability struct {
115 // ImageType Image coded, e.g. Jpeg.
116 ImageType SystemInfoImageType `json:"imageType"`
117
118 // MaxDimensions Maximum supported dimensions of the image in pixels.
119 MaxDimensions *SystemInfoSize `json:"maxDimensions"`
120
121 // MinDimensions Minimum supported dimensions of the image in pixels.
122 MinDimensions *SystemInfoSize `json:"minDimensions"`
123
124 // Subsamplings Optional array of supported subsampling formats, e.g. 4:2:0, if known.
125 Subsamplings []SystemInfoSubsamplingFormat `json:"subsamplings"`
126}
127
128// SystemInfoGPUInfo Provides information about the GPU(s) on the system.
129type SystemInfoGPUInfo struct {
130 // Devices The graphics devices on the system. Element 0 is the primary GPU.
131 Devices []*SystemInfoGPUDevice `json:"devices"`
132
133 // AuxAttributes (optional) An optional dictionary of additional GPU related attributes.
134 AuxAttributes map[string]gson.JSON `json:"auxAttributes,omitempty"`
135
136 // FeatureStatus (optional) An optional dictionary of graphics features and their status.
137 FeatureStatus map[string]gson.JSON `json:"featureStatus,omitempty"`
138
139 // DriverBugWorkarounds An optional array of GPU driver bug workarounds.
140 DriverBugWorkarounds []string `json:"driverBugWorkarounds"`
141
142 // VideoDecoding Supported accelerated video decoding capabilities.
143 VideoDecoding []*SystemInfoVideoDecodeAcceleratorCapability `json:"videoDecoding"`
144
145 // VideoEncoding Supported accelerated video encoding capabilities.
146 VideoEncoding []*SystemInfoVideoEncodeAcceleratorCapability `json:"videoEncoding"`
147
148 // ImageDecoding Supported accelerated image decoding capabilities.
149 ImageDecoding []*SystemInfoImageDecodeAcceleratorCapability `json:"imageDecoding"`
150}
151
152// SystemInfoProcessInfo Represents process info.
153type SystemInfoProcessInfo struct {
154 // Type Specifies process type.
155 Type string `json:"type"`
156
157 // ID Specifies process id.
158 ID int `json:"id"`
159
160 // CPUTime Specifies cumulative CPU usage in seconds across all threads of the
161 // process since the process start.
162 CPUTime float64 `json:"cpuTime"`
163}
164
165// SystemInfoGetInfo Returns information about the system.
166type SystemInfoGetInfo struct{}
167
168// ProtoReq name.
169func (m SystemInfoGetInfo) ProtoReq() string { return "SystemInfo.getInfo" }
170
171// Call the request.
172func (m SystemInfoGetInfo) Call(c Client) (*SystemInfoGetInfoResult, error) {
173 var res SystemInfoGetInfoResult
174 return &res, call(m.ProtoReq(), m, &res, c)
175}
176
177// SystemInfoGetInfoResult ...
178type SystemInfoGetInfoResult struct {
179 // Gpu Information about the GPUs on the system.
180 Gpu *SystemInfoGPUInfo `json:"gpu"`
181
182 // ModelName A platform-dependent description of the model of the machine. On Mac OS, this is, for
183 // example, 'MacBookPro'. Will be the empty string if not supported.
184 ModelName string `json:"modelName"`
185
186 // ModelVersion A platform-dependent description of the version of the machine. On Mac OS, this is, for
187 // example, '10.1'. Will be the empty string if not supported.
188 ModelVersion string `json:"modelVersion"`
189
190 // CommandLine The command line string used to launch the browser. Will be the empty string if not
191 // supported.
192 CommandLine string `json:"commandLine"`
193}
194
195// SystemInfoGetFeatureState Returns information about the feature state.
196type SystemInfoGetFeatureState struct {
197 // FeatureState ...
198 FeatureState string `json:"featureState"`
199}
200
201// ProtoReq name.
202func (m SystemInfoGetFeatureState) ProtoReq() string { return "SystemInfo.getFeatureState" }
203
204// Call the request.
205func (m SystemInfoGetFeatureState) Call(c Client) (*SystemInfoGetFeatureStateResult, error) {
206 var res SystemInfoGetFeatureStateResult
207 return &res, call(m.ProtoReq(), m, &res, c)
208}
209
210// SystemInfoGetFeatureStateResult ...
211type SystemInfoGetFeatureStateResult struct {
212 // FeatureEnabled ...
213 FeatureEnabled bool `json:"featureEnabled"`
214}
215
216// SystemInfoGetProcessInfo Returns information about all running processes.
217type SystemInfoGetProcessInfo struct{}
218
219// ProtoReq name.
220func (m SystemInfoGetProcessInfo) ProtoReq() string { return "SystemInfo.getProcessInfo" }
221
222// Call the request.
223func (m SystemInfoGetProcessInfo) Call(c Client) (*SystemInfoGetProcessInfoResult, error) {
224 var res SystemInfoGetProcessInfoResult
225 return &res, call(m.ProtoReq(), m, &res, c)
226}
227
228// SystemInfoGetProcessInfoResult ...
229type SystemInfoGetProcessInfoResult struct {
230 // ProcessInfo An array of process info blocks.
231 ProcessInfo []*SystemInfoProcessInfo `json:"processInfo"`
232}