Native Client

PP_CompletionCallback Struct Reference

Any method that takes a PP_CompletionCallback has the option of completing asynchronously if the operation would block. More...


Detailed Description

Any method that takes a PP_CompletionCallback has the option of completing asynchronously if the operation would block.

Such a method should return PP_OK_COMPLETIONPENDING to indicate that the method will complete asynchronously and notify the caller and will always be invoked from the main thread of PPAPI execution. If the completion callback is NULL, then the operation will block if necessary to complete its work. PP_BlockUntilComplete() provides a convenient way to specify blocking behavior. Refer to PP_BlockUntilComplete for more information.

The result parameter passed to func is an int32_t that, if negative indicates an error code whose meaning is specific to the calling method (refer to pp_error.h for further information). A positive or 0 value is a return result indicating success whose meaning depends on the calling method (e.g. number of bytes read).

Data Fields List

PP_CompletionCallback_Func func
void * user_data
int32_t flags

Data Fields Details

Flags used to control how non-NULL callbacks are scheduled by asynchronous methods.

This value is a callback function that will be called.

This value is a pointer to user data passed to a callback function.


The documentation for this struct was generated from the following file:

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.