Enums
Enumerations
Functions
PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES (PP_MouseCursor_Type, 4) |
Variables
Enumeration Type Documentation
anonymous enum |
This enumeration contains enumerators of all PPAPI error codes.
Errors are negative valued. Callers should treat all negative values as a failure, even if it's not in the list, since the possible errors are likely to expand and change over time.
- Enumerator:
PP_OK This value is returned by a function on successful synchronous completion or is passed as a result to a PP_CompletionCallback_Func on successful asynchronous completion.
PP_OK_COMPLETIONPENDING This value is returned by a function that accepts a PP_CompletionCallback and cannot complete synchronously.
This code indicates that the given callback will be asynchronously notified of the final result once it is available.
PP_ERROR_FAILED This value indicates failure for unspecified reasons.
PP_ERROR_ABORTED This value indicates failure due to an asynchronous operation being interrupted.
The most common cause of this error code is destroying a resource that still has a callback pending. All callbacks are guaranteed to execute, so any callbacks pending on a destroyed resource will be issued with PP_ERROR_ABORTED.
If you get an aborted notification that you aren't expecting, check to make sure that the resource you're using is still in scope. A common mistake is to create a resource on the stack, which will destroy the resource as soon as the function returns.
PP_ERROR_BADARGUMENT This value indicates failure due to an invalid argument.
PP_ERROR_BADRESOURCE This value indicates failure due to an invalid PP_Resource.
PP_ERROR_NOINTERFACE This value indicates failure due to an unavailable PPAPI interface.
PP_ERROR_NOACCESS This value indicates failure due to insufficient privileges.
PP_ERROR_NOMEMORY This value indicates failure due to insufficient memory.
PP_ERROR_NOSPACE This value indicates failure due to insufficient storage space.
PP_ERROR_NOQUOTA This value indicates failure due to insufficient storage quota.
PP_ERROR_INPROGRESS This value indicates failure due to an action already being in progress.
PP_ERROR_NOTSUPPORTED The requested command is not supported by the browser.
PP_ERROR_BLOCKS_MAIN_THREAD Returned if you try to use a null completion callback to "block until complete" on the main thread.
Blocking the main thread is not permitted to keep the browser responsive (otherwise, you may not be able to handle input events, and there are reentrancy and deadlock issues).
PP_ERROR_FILENOTFOUND This value indicates failure due to a file that does not exist.
PP_ERROR_FILEEXISTS This value indicates failure due to a file that already exists.
PP_ERROR_FILETOOBIG This value indicates failure due to a file that is too big.
PP_ERROR_FILECHANGED This value indicates failure due to a file having been modified unexpectedly.
PP_ERROR_NOTAFILE This value indicates that the pathname does not reference a file.
PP_ERROR_TIMEDOUT This value indicates failure due to a time limit being exceeded.
PP_ERROR_USERCANCEL This value indicates that the user cancelled rather than providing expected input.
PP_ERROR_NO_USER_GESTURE This value indicates failure due to lack of a user gesture such as a mouse click or key input event.
Examples of actions requiring a user gesture are showing the file chooser dialog and going into fullscreen mode.
PP_ERROR_CONTEXT_LOST This value indicates that the graphics context was lost due to a power management event.
PP_ERROR_NO_MESSAGE_LOOP Indicates an attempt to make a PPAPI call on a thread without previously registering a message loop via PPB_MessageLoop.AttachToCurrentThread.
Without this registration step, no PPAPI calls are supported.
PP_ERROR_WRONG_THREAD Indicates that the requested operation is not permitted on the current thread.
PP_ERROR_CONNECTION_CLOSED This value indicates that the connection was closed.
For TCP sockets, it corresponds to a TCP FIN.
PP_ERROR_CONNECTION_RESET This value indicates that the connection was reset.
For TCP sockets, it corresponds to a TCP RST.
PP_ERROR_CONNECTION_REFUSED This value indicates that the connection attempt was refused.
PP_ERROR_CONNECTION_ABORTED This value indicates that the connection was aborted.
For TCP sockets, it means the connection timed out as a result of not receiving an ACK for data sent. This can include a FIN packet that did not get ACK'd.
PP_ERROR_CONNECTION_FAILED This value indicates that the connection attempt failed.
PP_ERROR_CONNECTION_TIMEDOUT This value indicates that the connection attempt timed out.
PP_ERROR_ADDRESS_INVALID This value indicates that the IP address or port number is invalid.
PP_ERROR_ADDRESS_UNREACHABLE This value indicates that the IP address is unreachable.
This usually means that there is no route to the specified host or network.
PP_ERROR_ADDRESS_IN_USE This value is returned when attempting to bind an address that is already in use.
PP_ERROR_MESSAGE_TOO_BIG This value indicates that the message was too large for the transport.
PP_ERROR_NAME_NOT_RESOLVED This value indicates that the host name could not be resolved.
anonymous enum |
enum PP_AudioSampleRate |
PP_AudioSampleRate is an enumeration of the different audio sampling rates.
PP_AUDIOSAMPLERATE_44100
is the sample rate used on CDs and PP_AUDIOSAMPLERATE_48000
is the sample rate used on DVDs and Digital Audio Tapes.
enum PP_Bool |
This enumeration contains flags used to control how non-NULL callbacks are scheduled by asynchronous methods.
- Enumerator:
enum PP_FileOpenFlags |
The PP_FileOpenFlags enum contains file open constants.
- Enumerator:
enum PP_FileSystemType |
The PP_FileSystemType
enum contains file system type constants.
- Enumerator:
enum PP_FileType |
enum PP_Graphics3DAttrib |
- Enumerator:
enum PP_HostResolver_Flag |
enum PP_ImageDataFormat |
PP_ImageDataFormat
is an enumeration of the different types of image data formats.
The third part of each enumeration value describes the memory layout from the lowest address to the highest. For example, BGRA means the B component is stored in the lowest address, no matter what endianness the platform is using.
The PREMUL suffix implies pre-multiplied alpha is used. In this mode, the red, green and blue color components of the pixel data supplied to an image data should be pre-multiplied by their alpha value. For example: starting with floating point color components, here is how to convert them to 8-bit premultiplied components for image data:
...components of a pixel, floats ranging from 0 to 1... float red = 1.0f;
float green = 0.50f;
float blue = 0.0f;
float alpha = 0.75f;
...components for image data are 8-bit values ranging from 0 to 255... uint8_t image_data_red_premul = (uint8_t)(red * alpha * 255.0f);
uint8_t image_data_green_premul = (uint8_t)(green * alpha * 255.0f);
uint8_t image_data_blue_premul = (uint8_t)(blue * alpha * 255.0f);
uint8_t image_data_alpha_premul = (uint8_t)(alpha * 255.0f);
Note: The resulting pre-multiplied red, green and blue components should not be greater than the alpha value.
enum PP_InputEvent_Class |
- Enumerator:
This enumeration contains event modifier constants.
Each modifier is one bit. Retrieve the modifiers from an input event using the GetEventModifiers function on PPB_InputEvent.
- Enumerator:
enum PP_InputEvent_Type |
This enumeration contains the types of input events.
- Enumerator:
enum PP_LogLevel |
enum PP_MouseCursor_Type |
The PP_MouseCursor_Type
enumeration lists the available stock cursor types.
- Enumerator:
enum PP_NetAddress_Family |
enum PP_NetworkList_State |
enum PP_NetworkList_Type |
enum PP_TCPSocket_Option |
Option names used by SetOption()
.
- Enumerator:
enum PP_TextInput_Type |
PP_TextInput_Type is used to indicate the status of a plugin in regard to text input.
- Enumerator:
enum PP_TouchListType |
- Enumerator:
enum PP_UDPSocket_Option |
Option names used by SetOption()
.
- Enumerator:
This enumeration contains properties that can be set on a URL request.
- Enumerator:
PP_URLREQUESTPROPERTY_URL This corresponds to a string (
PP_VARTYPE_STRING
).PP_URLREQUESTPROPERTY_METHOD This corresponds to a string (
PP_VARTYPE_STRING
); either POST or GET.Refer to the HTTP Methods documentation for further information.
PP_URLREQUESTPROPERTY_HEADERS This corresponds to a string (
PP_VARTYPE_STRING
);
delimited.Refer to the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"Header Field Definitions documentation for further information.
PP_URLREQUESTPROPERTY_STREAMTOFILE This corresponds to a
PP_Bool
(PP_VARTYPE_BOOL
; default=PP_FALSE
).Set this value to
PP_TRUE
if you want to download the data to a file. Use PPB_URLLoader.FinishStreamingToFile() to complete the download.PP_URLREQUESTPROPERTY_FOLLOWREDIRECTS This corresponds to a
PP_Bool
(PP_VARTYPE_BOOL
; default=PP_TRUE
).Set this value to
PP_FALSE
if you want to use PPB_URLLoader.FollowRedirects() to follow the redirects only after examining redirect headers.PP_URLREQUESTPROPERTY_RECORDDOWNLOADPROGRESS This corresponds to a
PP_Bool
(PP_VARTYPE_BOOL
; default=PP_FALSE
).Set this value to
PP_TRUE
if you want to be able to poll the download progress using PPB_URLLoader.GetDownloadProgress().PP_URLREQUESTPROPERTY_RECORDUPLOADPROGRESS This corresponds to a
PP_Bool
(default=PP_FALSE
).Set this value to
PP_TRUE
if you want to be able to poll the upload progress using PPB_URLLoader.GetUploadProgress().PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL This corresponds to a string (
PP_VARTYPE_STRING)
or may be undefined (PP_VARTYPE_UNDEFINED
; default).Set it to a string to set a custom referrer (if empty, the referrer header will be omitted), or to undefined to use the default referrer. Only loaders with universal access (only available on trusted implementations) will accept
URLRequestInfo
objects that try to set a custom referrer; if given to a loader without universal access,PP_ERROR_NOACCESS
will result.PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS This corresponds to a
PP_Bool
(PP_VARTYPE_BOOL
; default=PP_FALSE
).Whether cross-origin requests are allowed. Cross-origin requests are made using the CORS (Cross-Origin Resource Sharing) algorithm to check whether the request should be allowed. For the complete CORS algorithm, refer to the Cross-Origin Resource Sharing documentation.
PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS This corresponds to a
PP_Bool
(PP_VARTYPE_BOOL
; default=PP_FALSE
).Whether HTTP credentials are sent with cross-origin requests. If false, no credentials are sent with the request and cookies are ignored in the response. If the request is not cross-origin, this property is ignored.
PP_URLREQUESTPROPERTY_CUSTOMCONTENTTRANSFERENCODING This corresponds to a string (
PP_VARTYPE_STRING
) or may be undefined (PP_VARTYPE_UNDEFINED
; default).Set it to a string to set a custom content-transfer-encoding header (if empty, that header will be omitted), or to undefined to use the default (if any). Only loaders with universal access (only available on trusted implementations) will accept
URLRequestInfo
objects that try to set a custom content transfer encoding; if given to a loader without universal access,PP_ERROR_NOACCESS
will result.PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD This corresponds to an integer (
PP_VARTYPE_INT32
); default is not defined and is set by the browser, possibly depending on system capabilities.Set it to an integer to set an upper threshold for the prefetched buffer of an asynchronous load. When exceeded, the browser will defer loading until
PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD
is hit, at which time it will begin prefetching again. When setting this property,PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD
must also be set. Behavior is undefined if the former is <= the latter.PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERTHRESHOLD This corresponds to an integer (
PP_VARTYPE_INT32
); default is not defined and is set by the browser to a value appropriate for the defaultPP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD
.Set it to an integer to set a lower threshold for the prefetched buffer of an asynchronous load. When reached, the browser will resume loading if If
PP_URLREQUESTPROPERTY_PREFETCHBUFFERLOWERERTHRESHOLD
had previously been reached. When setting this property,PP_URLREQUESTPROPERTY_PREFETCHBUFFERUPPERTHRESHOLD
must also be set. Behavior is undefined if the former is >= the latter.PP_URLREQUESTPROPERTY_CUSTOMUSERAGENT This corresponds to a string (
PP_VARTYPE_STRING
) or may be undefined (PP_VARTYPE_UNDEFINED
; default).Set it to a string to set a custom user-agent header (if empty, that header will be omitted), or to undefined to use the default. Only loaders with universal access (only available on trusted implementations) will accept
URLRequestInfo
objects that try to set a custom user agent; if given to a loader without universal access,PP_ERROR_NOACCESS
will result.
This enumeration contains properties set on a URL response.
- Enumerator:
PP_URLRESPONSEPROPERTY_URL This corresponds to a string (PP_VARTYPE_STRING); an absolute URL formed by resolving the relative request URL with the absolute document URL.
Refer to the HTTP Request URI and HTML Resolving Relative URIs documentation for further information.
PP_URLRESPONSEPROPERTY_REDIRECTURL This corresponds to a string (PP_VARTYPE_STRING); the absolute URL returned in the response header's 'Location' field if this is a redirect response, an empty string otherwise.
Refer to the HTTP Status Codes - Redirection documentation for further information.
PP_URLRESPONSEPROPERTY_REDIRECTMETHOD This corresponds to a string (PP_VARTYPE_STRING); the HTTP method to be used in a new request if this is a redirect response, an empty string otherwise.
Refer to the HTTP Status Codes - Redirection documentation for further information.
PP_URLRESPONSEPROPERTY_STATUSCODE This corresponds to an int32 (PP_VARETYPE_INT32); the status code from the response, e.g., 200 if the request was successful.
Refer to the HTTP Status Code and Reason Phrase documentation for further information.
PP_URLRESPONSEPROPERTY_STATUSLINE This corresponds to a string (PP_VARTYPE_STRING); the status line from the response.
Refer to the HTTP Response Status Line documentation for further information.
PP_URLRESPONSEPROPERTY_HEADERS This corresponds to a string(PP_VARTYPE_STRING), a
-delimited list of header field/value pairs of the form "field: value", returned by the server.Refer to the HTTP Header Field Definitions documentation for further information.
enum PP_VarType |
The PP_VarType
is an enumeration of the different types that can be contained within a PP_Var
structure.
- Enumerator:
This enumeration contains status codes.
These codes are used in Close() and GetCloseCode(). Refer to RFC 6455, The WebSocket Protocol, for further information. PP_WEBSOCKETSTATUSCODE_NORMAL_CLOSURE
and codes in the range PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MIN
to PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MAX
, and PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MIN
to PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX
are valid for Close().
- Enumerator:
This enumeration contains the types representing the WebSocket ready state and these states are based on the JavaScript WebSocket API specification.
GetReadyState() returns one of these states.
- Enumerator: