Skip to main content

ohos_web_binding/protocol/
net_error.rs

1use ohos_web_sys::*;
2
3use ohos_enum_derive::EnumFrom;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumFrom)]
6#[config(ArkWeb_NetError, "ArkWeb_NetError_ARKWEB_ERR_")]
7#[repr(i32)]
8pub enum NetError {
9    #[prefix("ArkWeb_NetError_ARKWEB_NET_")]
10    Ok = 0,
11    IoPending = -1,
12    Failed = -2,
13    Aborted = -3,
14    InvalidArgument = -4,
15    InvalidHandle = -5,
16    FileNotFound = -6,
17    TimedOut = -7,
18    FileTooLarge = -8,
19    Unexpected = -9,
20    AccessDenied = -10,
21    NotImplemented = -11,
22    InsufficientResources = -12,
23    OutOfMemory = -13,
24    UploadFileChanged = -14,
25    SocketNotConnected = -15,
26    FileExists = -16,
27    FilePathTooLong = -17,
28    FileNoSpace = -18,
29    FileVirusInfected = -19,
30    BlockedByClient = -20,
31    NetworkChanged = -21,
32    BlockedByAdministrator = -22,
33    SocketConnected = -23,
34    UploadStreamRewindNotSupported = -25,
35    ContextShutDown = -26,
36    BlockedByResponse = -27,
37    CleartextNotPermitted = -29,
38    BlockedByCsp = -30,
39    #[suffix("H2_OR_QUIC_REQUIRED")]
40    H2OrQuicRequired = -31,
41    BlockedByOrb = -32,
42    ConnectionClosed = -100,
43    ConnectionReset = -101,
44    ConnectionRefused = -102,
45    ConnectionAborted = -103,
46    ConnectionFailed = -104,
47    NameNotResolved = -105,
48    InternetDisconnected = -106,
49    SslProtocolError = -107,
50    AddressInvalid = -108,
51    AddressUnreachable = -109,
52    SslClientAuthCertNeeded = -110,
53    TunnelConnectionFailed = -111,
54    NoSslVersionsEnabled = -112,
55    SslVersionOrCipherMismatch = -113,
56    SslRenegotiationRequested = -114,
57    ProxyAuthUnsupported = -115,
58    BadSslClientAuthCert = -117,
59    ConnectionTimedOut = -118,
60    HostResolverQueueTooLarge = -119,
61    SocksConnectionFailed = -120,
62    SocksConnectionHostUnreachable = -121,
63    AlpnNegotiationFailed = -122,
64    SslNoRenegotiation = -123,
65    WinsockUnexpectedWrittenBytes = -124,
66    SslDecompressionFailureAlert = -125,
67    SslBadRecordMacAlert = -126,
68    ProxyAuthRequested = -127,
69    ProxyConnectionFailed = -130,
70    MandatoryProxyConfigurationFailed = -131,
71    PreconnectMaxSocketLimit = -133,
72    SslClientAuthPrivateKeyAccessDenied = -134,
73    SslClientAuthCertNoPrivateKey = -135,
74    ProxyCertificateInvalid = -136,
75    NameResolutionFailed = -137,
76    NetworkAccessDenied = -138,
77    TemporarilyThrottled = -139,
78    HttpsProxyTunnelResponseRedirect = -140,
79    SslClientAuthSignatureFailed = -141,
80    MsgTooBig = -142,
81    WsProtocolError = -145,
82    AddressInUse = -147,
83    SslHandshakeNotCompleted = -148,
84    SslBadPeerPublicKey = -149,
85    SslPinnedKeyNotInCertChain = -150,
86    ClientAuthCertTypeUnsupported = -151,
87    SslDecryptErrorAlert = -153,
88    WsThrottleQueueTooLarge = -154,
89    SslServerCertChanged = -156,
90    SslUnrecognizedNameAlert = -159,
91    SocketSetReceiveBufferSizeError = -160,
92    SocketSetSendBufferSizeError = -161,
93    SocketReceiveBufferSizeUnchangeable = -162,
94    SocketSendBufferSizeUnchangeable = -163,
95    SslClientAuthCertBadFormat = -164,
96    IcannNameCollision = -166,
97    SslServerCertBadFormat = -167,
98    CtSthParsingFailed = -168,
99    CtSthIncomplete = -169,
100    UnableToReuseConnectionForProxyAuth = -170,
101    CtConsistencyProofParsingFailed = -171,
102    SslObsoleteCipher = -172,
103    WsUpgrade = -173,
104    ReadIfReadyNotImplemented = -174,
105    NoBufferSpace = -176,
106    SslClientAuthNoCommonAlgorithms = -177,
107    EarlyDataRejected = -178,
108    WrongVersionOnEarlyData = -179,
109    #[suffix("TLS13_DOWNGRADE_DETECTED")]
110    Tls13DowngradeDetected = -180,
111    SslKeyUsageIncompatible = -181,
112    InvalidEchConfigList = -182,
113    EchNotNegotiated = -183,
114    EchFallbackCertificateInvalid = -184,
115    CertCommonNameInvalid = -200,
116    CertDateInvalid = -201,
117    CertAuthorityInvalid = -202,
118    CertContainsErrors = -203,
119    CertNoRevocationMechanism = -204,
120    CertUnableToCheckRevocation = -205,
121    CertRevoked = -206,
122    CertInvalid = -207,
123    CertWeakSignatureAlgorithm = -208,
124    CertNonUniqueName = -210,
125    CertWeakKey = -211,
126    CertNameConstraintViolation = -212,
127    CertValidityTooLong = -213,
128    CertificateTransparencyRequired = -214,
129    CertSymantecLegacy = -215,
130    CertKnownInterceptionBlocked = -217,
131    SslObsoleteVersionOrCipher = -218,
132    CertEnd = -219,
133    InvalidUrl = -300,
134    DisallowedUrlScheme = -301,
135    UnknownUrlScheme = -302,
136    InvalidRedirect = -303,
137    TooManyRedirects = -310,
138    UnsafeRedirect = -311,
139    UnsafePort = -312,
140    InvalidResponse = -320,
141    InvalidChunkedEncoding = -321,
142    MethodUnsupported = -322,
143    UnexpectedProxyAuth = -323,
144    EmptyResponse = -324,
145    ResponseHeadersTooBig = -325,
146    PacScriptFailed = -327,
147    RequestRangeNotSatisfiable = -328,
148    MalformedIdentity = -329,
149    ContentDecodingFailed = -330,
150    NetworkIoSuspended = -331,
151    SynReplyNotReceived = -332,
152    EncodingConversionFailed = -333,
153    UnrecognizedFtpDirectoryListingFormat = -334,
154    NoSupportedProxies = -336,
155    #[suffix("HTTP2_PROTOCOL_ERROR")]
156    Http2ProtocolError = -337,
157    InvalidAuthCredentials = -338,
158    UnsupportedAuthScheme = -339,
159    EncodingDetectionFailed = -340,
160    MissingAuthCredentials = -341,
161    UnexpectedSecurityLibraryStatus = -342,
162    MisconfiguredAuthEnvironment = -343,
163    UndocumentedSecurityLibraryStatus = -344,
164    ResponseBodyTooBigToDrain = -345,
165    ResponseHeadersMultipleContentLength = -346,
166    #[suffix("INCOMPLETE_HTTP2_HEADERS")]
167    IncompleteHttp2Headers = -347,
168    PacNotInDhcp = -348,
169    ResponseHeadersMultipleContentDisposition = -349,
170    ResponseHeadersMultipleLocation = -350,
171    #[suffix("HTTP2_SERVER_REFUSED_STREAM")]
172    Http2ServerRefusedStream = -351,
173    #[suffix("HTTP2_PING_FAILED")]
174    Http2PingFailed = -352,
175    ContentLengthMismatch = -354,
176    IncompleteChunkedEncoding = -355,
177    QuicProtocolError = -356,
178    ResponseHeadersTruncated = -357,
179    QuicHandshakeFailed = -358,
180    #[suffix("HTTP2_INADEQUATE_TRANSPORT_SECURITY")]
181    Http2InadequateTransportSecurity = -360,
182    #[suffix("HTTP2_FLOW_CONTROL_ERROR")]
183    Http2FlowControlError = -361,
184    #[suffix("HTTP2_FRAME_SIZE_ERROR")]
185    Http2FrameSizeError = -362,
186    #[suffix("HTTP2_COMPRESSION_ERROR")]
187    Http2CompressionError = -363,
188    ProxyAuthRequestedWithNoConnection = -364,
189    #[suffix("HTTP_1_1_REQUIRED")]
190    Http11Required = -365,
191    #[suffix("PROXY_HTTP_1_1_REQUIRED")]
192    ProxyHttp11Required = -366,
193    PacScriptTerminated = -367,
194    InvalidHttpResponse = -370,
195    ContentDecodingInitFailed = -371,
196    #[suffix("HTTP2_RST_STREAM_NO_ERROR_RECEIVED")]
197    Http2RstStreamNoErrorReceived = -372,
198    #[suffix("HTTP2_PUSHED_STREAM_NOT_AVAILABLE")]
199    Http2PushedStreamNotAvailable = -373,
200    #[suffix("HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER")]
201    Http2ClaimedPushedStreamResetByServer = -374,
202    TooManyRetries = -375,
203    #[suffix("HTTP2_STREAM_CLOSED")]
204    Http2StreamClosed = -376,
205    #[suffix("HTTP2_CLIENT_REFUSED_STREAM")]
206    Http2ClientRefusedStream = -377,
207    #[suffix("HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH")]
208    Http2PushedResponseDoesNotMatch = -378,
209    HttpResponseCodeFailure = -379,
210    QuicUnknownCertRoot = -380,
211    QuicGoawayRequestCanBeRetried = -381,
212    TooManyAcceptChRestarts = -382,
213    InconsistentIpAddressSpace = -383,
214    CachedIpAddressSpaceBlockedByLocalNetworkAccessPolicy = -384,
215    CacheMiss = -400,
216    CacheReadFailure = -401,
217    CacheWriteFailure = -402,
218    CacheOperationUnsupported = -403,
219    CacheOpenFailure = -404,
220    CacheCreateFailure = -405,
221    CacheRace = -406,
222    CacheChecksumReadFailure = -407,
223    CacheChecksumMismatch = -408,
224    CacheLockTimeout = -409,
225    CacheAuthFailureAfterRead = -410,
226    CacheEntryNotSuitable = -411,
227    CacheDoomFailure = -412,
228    CacheOpenOrCreateFailure = -413,
229    InsecureResponse = -501,
230    NoPrivateKeyForCert = -502,
231    AddUserCertFailed = -503,
232    InvalidSignedExchange = -504,
233    InvalidWebBundle = -505,
234    TrustTokenOperationFailed = -506,
235    TrustTokenOperationSuccessWithoutSendingRequest = -507,
236    FtpFailed = -601,
237    FtpServiceUnavailable = -602,
238    FtpTransferAborted = -603,
239    FtpFileBusy = -604,
240    FtpSyntaxError = -605,
241    FtpCommandUnsupported = -606,
242    FtpBadCommandSequence = -607,
243    #[suffix("PKCS12_IMPORT_BAD_PASSWORD")]
244    Pkcs12ImportBadPassword = -701,
245    #[suffix("PKCS12_IMPORT_FAILED")]
246    Pkcs12ImportFailed = -702,
247    ImportCaCertNotCa = -703,
248    ImportCertAlreadyExists = -704,
249    ImportCaCertFailed = -705,
250    ImportServerCertFailed = -706,
251    #[suffix("PKCS12_IMPORT_INVALID_MAC")]
252    Pkcs12ImportInvalidMac = -707,
253    #[suffix("PKCS12_IMPORT_INVALID_FILE")]
254    Pkcs12ImportInvalidFile = -708,
255    #[suffix("PKCS12_IMPORT_UNSUPPORTED")]
256    Pkcs12ImportUnsupported = -709,
257    KeyGenerationFailed = -710,
258    PrivateKeyExportFailed = -712,
259    SelfSignedCertGenerationFailed = -713,
260    CertDatabaseChanged = -714,
261    CertVerifierChanged = -716,
262    DnsMalformedResponse = -800,
263    DnsServerRequiresTcp = -801,
264    DnsServerFailed = -802,
265    DnsTimedOut = -803,
266    DnsCacheMiss = -804,
267    DnsSearchEmpty = -805,
268    DnsSortError = -806,
269    DnsSecureResolverHostnameResolutionFailed = -808,
270    DnsNameHttpsOnly = -809,
271    DnsRequestCanceled = -810,
272    DnsNoMatchingSupportedAlpn = -811,
273    #[fallback]
274    Unknown(ArkWeb_NetError) = i32::MIN,
275}