summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authorjond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-28 17:02:59 +0000
committerjond@google.com <jond@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-28 17:02:59 +0000
commite16d4401b81612b651077c569ad61990f6b420d1 (patch)
tree7db435956c38b329b4fd31e09a99e1c81f5d3861 /ppapi/c
parent9cb3b066d2078163a51611fbf215af46ce46b97a (diff)
downloadchromium_src-e16d4401b81612b651077c569ad61990f6b420d1.zip
chromium_src-e16d4401b81612b651077c569ad61990f6b420d1.tar.gz
chromium_src-e16d4401b81612b651077c569ad61990f6b420d1.tar.bz2
pp_stdint.h: moved else, include, and endif
ppb.h: changed to relative url ppb_audio.h: changed to relative url ppb_audio_config.h: changed to relative url ppb_image_data.h: changed in/out to in,out (correct syntax) ppb_url_loader.h: removed a bunch of </li> tags that were unneeded and causing warnings, also rename parm to param and in/out to in,out ppp_instance.h: escaped some <embed> tags so they didn't confuse Doxygen. Review URL: http://codereview.chromium.org/7248017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/pp_stdint.h9
-rw-r--r--ppapi/c/ppb.h2
-rw-r--r--ppapi/c/ppb_audio.h24
-rw-r--r--ppapi/c/ppb_audio_config.h129
-rw-r--r--ppapi/c/ppb_image_data.h122
-rw-r--r--ppapi/c/ppb_url_loader.h196
-rw-r--r--ppapi/c/ppp_instance.h18
7 files changed, 270 insertions, 230 deletions
diff --git a/ppapi/c/pp_stdint.h b/ppapi/c/pp_stdint.h
index 6117af6..a83850a 100644
--- a/ppapi/c/pp_stdint.h
+++ b/ppapi/c/pp_stdint.h
@@ -42,12 +42,11 @@ typedef __int64 int64_t;
/** This value represents a guaranteed unsigned 64 bit integer. */
typedef unsigned __int64 uint64_t;
-/**
- * @}
- */
+
#else
#include <stdint.h>
#endif
-
+/**
+ * @}
+ */
#endif /* PPAPI_C_PP_STDINT_H_ */
-
diff --git a/ppapi/c/ppb.h b/ppapi/c/ppb.h
index 264c661..b8ab93f 100644
--- a/ppapi/c/ppb.h
+++ b/ppapi/c/ppb.h
@@ -23,7 +23,7 @@
* names are ASCII strings and are generally defined in the header file for the
* interface, such as PP_AUDIO_INTERFACE found in ppb.audio.h or
* PPB_GRAPHICS_2D_INTERFACE in ppb_graphics_2d.h. Click
- * <a href="http://code.google.com/chrome/nativeclient/docs/reference/pepperc/
+ * <a href="/chrome/nativeclient/docs/reference/pepperc/
*globals_defs.html" title="macros">here</a> for a complete list of interface
* names.
*
diff --git a/ppapi/c/ppb_audio.h b/ppapi/c/ppb_audio.h
index fdc882b..6fb2978 100644
--- a/ppapi/c/ppb_audio.h
+++ b/ppapi/c/ppb_audio.h
@@ -16,10 +16,8 @@
/**
* @file
- * This file defines the PPB_Audio interface, which provides realtime stereo
- * audio streaming capabilities. Please refer to the
- * <a href="http://code.google.com/chrome/nativeclient/docs/audio.html">Pepper
- * Audio API Code Walkthrough</a> for information on using this interface.
+ * This file defines the <code>PPB_Audio</code> interface, which provides
+ * realtime stereo audio streaming capabilities.
*/
/**
@@ -28,9 +26,10 @@
*/
/**
- * PPB_Audio_Callback defines the type of an audio callback function used to
- * fill the audio buffer with data. Please see the Create() function in the
- * PPB_Audio interface for more details on this callback.
+ * <code>PPB_Audio_Callback</code> defines the type of an audio callback
+ * function used to fill the audio buffer with data. Please see the
+ * <code>Create()</code> function in the <code>PPB_Audio</code> interface for
+ * more details on this callback.
*/
typedef void (*PPB_Audio_Callback)(void* sample_buffer,
uint32_t buffer_size_in_bytes,
@@ -44,12 +43,15 @@ typedef void (*PPB_Audio_Callback)(void* sample_buffer,
* @{
*/
/**
- * The PPB_Audio interface contains pointers to several functions for handling
- * audio resources. Please see descriptions for each PPB_Audio and
- * PPB_AudioConfig function for more details.
+ * The <code>PPB_Audio</code> interface contains pointers to several functions
+ * for handling audio resources. Please refer to the
+ * <a href="/chrome/nativeclient/docs/audio.html">Pepper
+ * Audio API Code Walkthrough</a> for information on using this interface.
+ * Please see descriptions for each <code>PPB_Audio</code> and
+ * <code>PPB_AudioConfig</code> function for more details.
*
* A C example using PPB_Audio and PPB_AudioConfig:
- *
+ * @code
* void audio_callback(void* sample_buffer,
* uint32_t buffer_size_in_bytes,
* void* user_data) {
diff --git a/ppapi/c/ppb_audio_config.h b/ppapi/c/ppb_audio_config.h
index 1f4f4c1..5ae4afe 100644
--- a/ppapi/c/ppb_audio_config.h
+++ b/ppapi/c/ppb_audio_config.h
@@ -17,9 +17,7 @@
/**
* @file
* This file defines the PPB_AudioConfig interface for establishing an
- * audio configuration resource within the browser. Refer to the
- * <a href="http://code.google.com/chrome/nativeclient/docs/audio.html">Pepper
- * Audio API Code Walkthrough</a> for information on using this interface.
+ * audio configuration resource within the browser.
*/
/**
@@ -30,8 +28,9 @@
/**
* This enumeration contains audio frame count constants.
- * PP_AUDIOMINSAMPLEFRAMECOUNT is the minimum possible frame count.
- * PP_AUDIOMAXSAMPLEFRAMECOUNT is the maximum possible frame count.
+ * <code>PP_AUDIOMINSAMPLEFRAMECOUNT</code> is the minimum possible frame
+ * count. <code>PP_AUDIOMAXSAMPLEFRAMECOUNT</code> is the maximum possible
+ * frame count.
*/
enum {
PP_AUDIOMINSAMPLEFRAMECOUNT = 64,
@@ -49,9 +48,9 @@ enum {
/**
* 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.
+ * <code>PP_AUDIOSAMPLERATE_44100</code> is the sample rate used on CDs and
+ * <code>PP_AUDIOSAMPLERATE_48000</code> is the sample rate used on DVDs and
+ * Digital Audio Tapes.
*/
typedef enum {
PP_AUDIOSAMPLERATE_NONE = 0,
@@ -69,95 +68,109 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_AudioSampleRate, 4);
*/
/**
- * The PPB_AudioConfig interface contains pointers to several functions for
- * establishing your audio configuration within the browser. This interface
- * only supports stereo * 16bit output.
+ * The <code>PPB_AudioConfig</code> interface contains pointers to several
+ * functions for establishing your audio configuration within the browser.
+ * This interface only supports stereo * 16bit output.
+ *
+ * Refer to the
+ * <a href="/chrome/nativeclient/docs/audio.html">Pepper
+ * Audio API Code Walkthrough</a> for information on using this interface.
*/
struct PPB_AudioConfig {
/**
- * CreateStereo16bit is a pointer to a function that creates a 16 bit audio
- * configuration resource. The |sample_frame_count| should be the result of
- * calling RecommendSampleFrameCount. If the sample frame count or bit rate
- * isn't supported, this function will fail and return a null resource.
+ * CreateStereo16bit() creates a 16 bit audio configuration resource. The
+ * <code>sample_frame_count</code> should be the result of calling
+ * <code>RecommendSampleFrameCount</code>. If the sample frame count or bit
+ * rate isn't supported, this function will fail and return a null resource.
*
* A single sample frame on a stereo device means one value for the left
* channel and one value for the right channel.
*
* Buffer layout for a stereo int16 configuration:
- * int16_t *buffer16;
- * buffer16[0] is the first left channel sample.
- * buffer16[1] is the first right channel sample.
- * buffer16[2] is the second left channel sample.
- * buffer16[3] is the second right channel sample.
+ * <code>int16_t *buffer16;</code>
+ * <code>buffer16[0]</code> is the first left channel sample.
+ * <code>buffer16[1]</code> is the first right channel sample.
+ * <code>buffer16[2]</code> is the second left channel sample.
+ * <code>buffer16[3]</code> is the second right channel sample.
* ...
- * buffer16[2 * (sample_frame_count - 1)] is the last left channel sample.
- * buffer16[2 * (sample_frame_count - 1) + 1] is the last right channel
- * sample.
+ * <code>buffer16[2 * (sample_frame_count - 1)]</code> is the last left
+ * channel sample.
+ * <code>buffer16[2 * (sample_frame_count - 1) + 1]</code> is the last
+ * right channel sample.
* Data will always be in the native endian format of the platform.
*
- * @param[in] instance A PP_Instance indentifying one instance of a module.
- * @param[in] sample_rate A PP_AudioSampleRate which is either
- * PP_AUDIOSAMPLERATE_44100 or PP_AUDIOSAMPLERATE_48000.
- * @param[in] sample_frame_count A uint32_t frame count returned from the
- * RecommendSampleFrameCount function.
- * @return A PP_Resource containing the PPB_Audio_Config if successful or
- * a null resource if the sample frame count or bit rate are not supported.
+ * @param[in] instance A <code>PP_Instance indentifying</code> one instance
+ * of a module.
+ * @param[in] sample_rate A P<code>P_AudioSampleRate</code> which is either
+ * <code>PP_AUDIOSAMPLERATE_44100</code> or
+ * <code>PP_AUDIOSAMPLERATE_48000</code>.
+ * @param[in] sample_frame_count A <code>uint32_t</code> frame count returned
+ * from the <code>RecommendSampleFrameCount</code> function.
+ * @return A <code>PP_Resource</code> containing the
+ * <code>PPB_Audio_Config</code> if successful or a null resource if the
+ * sample frame count or bit rate are not supported.
*/
PP_Resource (*CreateStereo16Bit)(PP_Instance instance,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count);
/**
- * RecommendSampleFrameCount is a pointer to a function that returns the
- * supported sample frame count closest to the requested count. The sample
- * frame count determines the overall latency of audio. Since one "frame" is
- * always buffered in advance, smaller frame counts will yield lower latency,
- * but higher CPU utilization.
+ * RecommendSampleFrameCount() returns the supported sample frame count
+ * closest to the requested count. The sample frame count determines the
+ * overall latency of audio. Since one "frame" is always buffered in advance,
+ * smaller frame counts will yield lower latency, but higher CPU utilization.
*
* Supported sample frame counts will vary by hardware and system (consider
* that the local system might be anywhere from a cell phone or a high-end
- * audio workstation). Sample counts less than PP_AUDIOMINSAMPLEFRAMECOUNT
- * and greater than PP_AUDIOMAXSAMPLEFRAMECOUNT are never supported on any
+ * audio workstation). Sample counts less than
+ * <code>PP_AUDIOMINSAMPLEFRAMECOUNT</code> and greater than
+ * <code>PP_AUDIOMAXSAMPLEFRAMECOUNT</code> are never supported on any
* system, but values in between aren't necessarily valid. This function
* will return a supported count closest to the requested value.
*
- * @param[in] sample_rate A PP_AudioSampleRate which is either
- * PP_AUDIOSAMPLERATE_44100 or PP_AUDIOSAMPLERATE_48000.
- * @param[in] requested_sample_frame_count A uint_32t requested frame count.
- * @return A uint32_t containing the recommended sample frame count if
- * successful.
+ * @param[in] sample_rate A <code>PP_AudioSampleRate which is either
+ * <code>PP_AUDIOSAMPLERATE_44100</code> or
+ * <code>PP_AUDIOSAMPLERATE_48000.</code>
+ * @param[in] requested_sample_frame_count A <code>uint_32t</code> requested
+ * frame count.
+ * @return A <code>uint32_t</code> containing the recommended sample frame
+ * count if successful.
*/
uint32_t (*RecommendSampleFrameCount)(PP_AudioSampleRate sample_rate,
uint32_t requested_sample_frame_count);
/**
- * IsAudioConfig is a pointer to a function that determines if the given
- * resource is a PPB_Audio_Config.
+ * IsAudioConfig() determines if the given resource is a
+ * <code>PPB_Audio_Config</code>.
*
- * @param[in] resource A PP_Resource containing the audio config resource.
- * @return A PP_BOOL containing PP_TRUE if the given resource is
- * an AudioConfig resource, otherwise PP_FALSE.
+ * @param[in] resource A <code>PP_Resource</code> containing the audio config
+ * resource.
+ * @return A <code>PP_BOOL</code> containing <code>PP_TRUE</code> if the given
+ * resource is an <code>AudioConfig</code> resource, otherwise
+ * <code>PP_FALSE</code>.
*/
PP_Bool (*IsAudioConfig)(PP_Resource resource);
/**
- * GetSampleRate is a pointer to a function that returns the sample
- * rate for the given PPB_Audio_Config.
+ * GetSampleRate() returns the sample rate for the given
+ * <code>PPB_Audio_Config</code>.
*
- * @param[in] config A PP_Resource containing the PPB_Audio_Config.
- * @return A PP_AudioSampleRate containing sample rate or
- * PP_AUDIOSAMPLERATE_NONE if the resource is invalid.
+ * @param[in] config A <code>PP_Resource</code> containing the
+ * <code>PPB_Audio_Config</code>.
+ * @return A <code>PP_AudioSampleRate</code> containing sample rate or
+ * <code>PP_AUDIOSAMPLERATE_NONE</code> if the resource is invalid.
*/
PP_AudioSampleRate (*GetSampleRate)(PP_Resource config);
/**
- * GetSampleFrameCount is a pointer to a function that returns the sample
- * frame count for the given PPB_Audio_Config.
+ * GetSampleFrameCount() returns the sample frame count for the given
+ * <code>PPB_Audio_Config</code>.
*
- * @param[in] config A PP_Resource containing the audio config resource.
- * @return A uint32_t containing sample frame count or
- * 0 if the resource is invalid. See RecommendSampleFrameCount for
- * more on sample frame counts.
+ * @param[in] config A <code>PP_Resource</code> containing the audio config
+ * resource.
+ * @return A <code>uint32_t</code> containing sample frame count or
+ * 0 if the resource is invalid. See <code>RecommendSampleFrameCount</code>
+ * for more on sample frame counts.
*/
uint32_t (*GetSampleFrameCount)(PP_Resource config);
};
diff --git a/ppapi/c/ppb_image_data.h b/ppapi/c/ppb_image_data.h
index 174481e..41456095 100644
--- a/ppapi/c/ppb_image_data.h
+++ b/ppapi/c/ppb_image_data.h
@@ -15,8 +15,8 @@
/**
* @file
- * This file defines the PPB_ImageData struct for determining how a browser
- * handles image data.
+ * This file defines the <code>PPB_ImageData</code> struct for determining how
+ * a browser handles image data.
*/
/**
@@ -25,7 +25,7 @@
*/
/**
- * PP_ImageDataFormat is an enumeration of the different types of
+ * <code>PP_ImageDataFormat</code> is an enumeration of the different types of
* image data formats.
*
* The third part of each enumeration value describes the memory layout from
@@ -38,17 +38,22 @@
* 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
+ *
+ * ...components of a pixel, floats ranging from 0 to 1...
+ * <code>float red = 1.0f;</code>
+ * <code><code>float green = 0.50f;</code>
+ * <code>float blue = 0.0f;</code>
+ * <code>float alpha = 0.75f;</code>
+ * ...components for image data are 8-bit values ranging from 0 to 255...
+ * <code>uint8_t image_data_red_premul = (uint8_t)(red * alpha * 255.0f);
+ * </code>
+ * <code>uint8_t image_data_green_premul = (uint8_t)(green * alpha * 255.0f);
+ * </code>
+ * <code>uint8_t image_data_blue_premul = (uint8_t)(blue * alpha * 255.0f);
+ * </code>
+ * <code>uint8_t image_data_alpha_premul = (uint8_t)(alpha * 255.0f);</code>
+ *
+ * Note: The resulting pre-multiplied red, green and blue components should not
* be greater than the alpha value.
*/
typedef enum {
@@ -66,13 +71,14 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ImageDataFormat, 4);
*/
/**
- * The PP_ImageDataDesc structure represents a description of image data.
+ * The <code>PP_ImageDataDesc</code> structure represents a description of
+ * image data.
*/
struct PP_ImageDataDesc {
/**
* This value represents one of the image data types in the
- * PP_ImageDataFormat enum.
+ * <code>PP_ImageDataFormat</code> enum.
*/
PP_ImageDataFormat format;
@@ -99,49 +105,51 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_ImageDataDesc, 16);
*/
/**
- * The PPB_ImageData interface contains pointers to several functions for
- * determining the browser's treatment of image data.
+ * The <code>PPB_ImageData</code> interface contains pointers to several
+ * functions for determining the browser's treatment of image data.
*/
struct PPB_ImageData {
/**
- * GetNativeImageDataFormat is a pointer to a function that returns the
- * browser's preferred format for image data. The browser uses this format
- * internally for painting. Other formats may require internal conversions
- * to paint or may have additional restrictions depending on the function.
+ * GetNativeImageDataFormat() returns the browser's preferred format for
+ * image data. The browser uses this format internally for painting. Other
+ * formats may require internal conversions to paint or may have additional
+ * restrictions depending on the function.
*
- * @return PP_ImageDataFormat containing the preferred format.
+ * @return A <code>PP_ImageDataFormat</code> containing the preferred format.
*/
PP_ImageDataFormat (*GetNativeImageDataFormat)();
/**
- * IsImageDataFormatSupported is a pointer to a function that determines if
- * the given image data format is supported by the browser.
+ * IsImageDataFormatSupported() determines if the given image data format is
+ * supported by the browser.
*
* @param[in] format The image data format.
- * @return PP_Bool with PP_TRUE if the given image data format is supported
- * by the browser.
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * image data format is supported by the browser.
*/
PP_Bool (*IsImageDataFormatSupported)(PP_ImageDataFormat format);
/**
- * Create is a pointer to a function that allocates an image data resource
- * with the given format and size.
+ * Create() allocates an image data resource with the given format and size.
*
* For security reasons, if uninitialized, the bitmap will not contain random
* memory, but may contain data from a previous image produced by the same
- * plugin if the bitmap was cached and re-used.
+ * module if the bitmap was cached and re-used.
*
- * @param[in] instance A PP_Instance indentifying one instance of a module.
+ * @param[in] instance A <code>PP_Instance</code> indentifying one instance
+ * of a module.
* @param[in] format The desired image data format.
- * @param[in] size A pointer to a PP_Size containing the image size.
- * @param[in] init_to_zero A PP_Bool to determine transparency at creation.
- * Set the init_to_zero flag if you want the bitmap initialized to
- * transparent during the creation process. If this flag is not set, the
- * current contents of the bitmap will be undefined, and the plugin should
+ * @param[in] size A pointer to a <code>PP_Size</code> containing the image
+ * size.
+ * @param[in] init_to_zero A <code>PP_Bool</code> to determine transparency
+ * at creation.
+ * Set the <code>init_to_zero</code> flag if you want the bitmap initialized
+ * to transparent during the creation process. If this flag is not set, the
+ * current contents of the bitmap will be undefined, and the module should
* be sure to set all the pixels.
*
- * @return A PP_Resource with a nonzero ID on succes or zero on failure.
- * Failure means the instance, image size, or format was invalid.
+ * @return A <code>PP_Resource</code> with a nonzero ID on succes or zero on
+ * failure. Failure means the instance, image size, or format was invalid.
*/
PP_Resource (*Create)(PP_Instance instance,
PP_ImageDataFormat format,
@@ -149,43 +157,47 @@ struct PPB_ImageData {
PP_Bool init_to_zero);
/**
- * IsImageData is a pointer to a function that determiens if a given resource
- * is image data.
+ * IsImageData() determiens if a given resource is image data.
*
- * @param[in] image_data A PP_Resource corresponding to image data.
- * @return A PP_Bool with PP_TRUE if the given resrouce is an image data
- * or PP_FALSE if the resource is invalid or some type other than image data.
+ * @param[in] image_data A <code>PP_Resource</code> corresponding to image
+ * data.
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resrouce is an image data or <code>PP_FALSE</code> if the resource is
+ * invalid or some type other than image data.
*/
PP_Bool (*IsImageData)(PP_Resource image_data);
/**
- * Describe is a pointer to a function that computes the description of the
+ * Describe() computes the description of the
* image data.
*
- * @param[in] image_data A PP_Resource corresponding to image data.
- * @param[in/out] desc A pointer to a PP_ImageDataDesc containing the
- * description.
- * @return A PP_Bool with PP_TRUE on success or PP_FALSE
- * if the resource is not an image data. On PP_FALSE, the |desc|
- * structure will be filled with 0.
+ * @param[in] image_data A <code>PP_Resource</code> corresponding to image
+ * data.
+ * @param[in,out] desc A pointer to a <code>PP_ImageDataDesc</code>
+ * containing the description.
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or
+ * <code>PP_FALSE</code> if the resource is not an image data. On
+ * <code>PP_FALSE</code>, the <code>desc</code> structure will be filled
+ * with 0.
*/
PP_Bool (*Describe)(PP_Resource image_data,
struct PP_ImageDataDesc* desc);
/**
- * Map is a pointer to a function that maps an image data into the plugin
- * address space.
+ * Map() maps an image data into the module address space.
*
- * @param[in] image_data A PP_Resource corresponding to image data.
+ * @param[in] image_data A <code>PP_Resource</code> corresponding to image
+ * data.
* @return A pointer to the beginning of the data.
*/
void* (*Map)(PP_Resource image_data);
/**
- * Unmap is a pointer to a function that unmaps an image data from the plugin
+ * Unmap is a pointer to a function that unmaps an image data from the module
* address space.
*
- * @param[in] image_data A PP_Resource corresponding to image data.
+ * @param[in] image_data A <code>PP_Resource</code> corresponding to image
+ * data.
*/
void (*Unmap)(PP_Resource image_data);
};
diff --git a/ppapi/c/ppb_url_loader.h b/ppapi/c/ppb_url_loader.h
index c325e32..6ff753b 100644
--- a/ppapi/c/ppb_url_loader.h
+++ b/ppapi/c/ppb_url_loader.h
@@ -17,7 +17,8 @@ struct PP_CompletionCallback;
/**
* @file
- * This file defines the PPB_URLLoader interface for loading URLs.
+ * This file defines the <strong>PPB_URLLoader</strong> interface for loading
+ * URLs.
*/
/**
@@ -26,174 +27,187 @@ struct PP_CompletionCallback;
*/
/**
- * The PPB_URLLoader interface contains pointers to functions for loading URLs.
- * The typical steps for loading a URL are:
+ * The <strong>PPB_URLLoader</strong> interface contains pointers to functions
+ * for loading URLs. The typical steps for loading a URL are:
*
- * -# Call Create() to create a URLLoader object.</li>
- * -# Create a URLRequestInfo object and set properties on it. Refer to
- * PPB_URLRequestInfo for further information.</li>
- * -# Call Open() with the URLRequestInfo as an argument.</li>
+ * -# Call Create() to create a URLLoader object.
+ * -# Create a <code>URLRequestInfo</code> object and set properties on it.
+ * Refer to <code>PPB_URLRequestInfo</code> for further information.
+ * -# Call Open() with the <code>URLRequestInfo</code> as an argument.
* -# When Open() completes, call GetResponseInfo() to examine the response
- * headers. Refer to PPB_URLResponseInfo for further information.</li>
- * -# Call ReadResponseBody() to stream the data for the response.</li>
+ * headers. Refer to <code>PPB_URLResponseInfo</code> for further information.
+ * -# Call ReadResponseBody() to stream the data for the response.
*
- * Alternatively, if PP_URLREQUESTPROPERTY_STREAMTOFILE was set on the
- * URLRequestInfo in step #2:
+ * Alternatively, if <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was set on
+ * the <code>URLRequestInfo</code> in step #2:
* - Call FinishStreamingToFile(), after examining the response headers
* (step #4), to wait for the downloaded file to be complete.
* - Then, access the downloaded file using the GetBodyAsFileRef() function of
- * the URLResponseInfo returned in step #4.
+ * the <code>URLResponseInfo</code> returned in step #4.
*/
struct PPB_URLLoader {
/**
- * Create is a pointer to a function that creates a new URLLoader
- * object. The URLLoader is associated with a particular instance, so that
+ * Create() creates a new <code>URLLoader</code> object. The
+ * <code>URLLoader</code> is associated with a particular instance, so that
* any UI dialogs that need to be shown to the user can be positioned
* relative to the window containing the instance.
*
- * @param[in] instance A PP_Instance indentifying one instance of a module.
- * @return A PP_Resource corresponding to a URLLoader if successful, 0 if
- * the instance is invalid.
+ * @param[in] instance A <code>PP_Instance</code> indentifying one instance
+ * of a module.
+ * @return A <code>PP_Resource</code> corresponding to a URLLoader if
+ * successful, 0 if the instance is invalid.
*/
PP_Resource (*Create)(PP_Instance instance);
/**
- * IsURLLoader is a pointer to a function that determines if a resource is a
- * URLLoader.
+ * IsURLLoader() determines if a resource is an <code>URLLoader</code>.
*
- * @param[in] resource A PP_Resource corresponding to a URLLoader.
- * @return PP_TRUE if the resource is a URLLoader, PP_FALSE if the resource is
- * invalid or some type other than URLLoader.
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @return <code>PP_TRUE</code> if the resource is a <code>URLLoader</code>,
+ * <code>PP_FALSE</code> if the resource is invalid or some type other
+ * than <code>URLLoader</code>.
*/
PP_Bool (*IsURLLoader)(PP_Resource resource);
/**
- * Open is a pointer to a function that begins loading the URLRequestInfo.
- * The operation completes when response headers are received or when an
- * error occurs. Use GetResponseInfo() to access the response
- * headers.
+ * Open() begins loading the <code>URLRequestInfo</code>. The operation
+ * completes when response headers are received or when an error occurs. Use
+ * GetResponseInfo() to access the response headers.
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
- * @param[in] resource A PP_Resource corresponding to a URLRequestInfo.
- * @param[in] callback A PP_CompletionCallback to run on asynchronous
- * completion of Open(). This callback will run when response
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * <code>URLRequestInfo</code>.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to run on
+ * asynchronous completion of Open(). This callback will run when response
* headers for the url are received or error occured. This callback
- * will only run if Open() returns PP_OK_COMPLETIONPENDING.
+ * will only run if Open() returns <code>PP_OK_COMPLETIONPENDING</code>.
*/
int32_t (*Open)(PP_Resource loader,
PP_Resource request_info,
struct PP_CompletionCallback callback);
/**
- * FollowRedirect is a pointer to a function that can be invoked to follow a
- * redirect after Open() completed on receiving redirect headers.
+ * FollowRedirect()can be invoked to follow a redirect after Open() completed
+ * on receiving redirect headers.
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
- * @param[in] callback A PP_CompletionCallback to run on asynchronous
- * completion of FollowRedirect(). This callback will run when response
- * headers for the redirect url are received or error occured. This callback
- * will only run if FollowRedirect() returns PP_OK_COMPLETIONPENDING.
- * @return An int32_t containing an error code from pp_errors.h.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to run on
+ * asynchronous completion of FollowRedirect(). This callback will run when
+ * response headers for the redirect url are received or error occured. This
+ * callback will only run if FollowRedirect() returns
+ * <code>PP_OK_COMPLETIONPENDING</code>.
+ * @return An int32_t containing an error code from <code>pp_errors.h</code>.
*/
int32_t (*FollowRedirect)(PP_Resource loader,
struct PP_CompletionCallback callback);
/**
- * GetUploadProgress is a pointer to a function that returns the current
- * upload progress (which is meaningful after Open() has been called).
- * Progress only refers to the request body and does not include the
- * headers.
+ * GetUploadProgress() returns the current upload progress (which is
+ * meaningful after Open() has been called). Progress only refers to the
+ * request body and does not include the headers.
*
- * This data is only available if the URLRequestInfo passed to Open() had the
- * PP_URLREQUESTPROPERTY_REPORTUPLOADPROGRESS property set to PP_TRUE.
+ * This data is only available if the <code>URLRequestInfo</code> passed
+ * to Open() had the <code>PP_URLREQUESTPROPERTY_REPORTUPLOADPROGRESS</code>
+ * property set to PP_TRUE.
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
* @param[in] bytes_sent The number of bytes sent thus far.
- * @parm[in] total_bytes_to_be_sent The total number of bytes to be sent.
- * @return PP_TRUE if the upload progress is available, PP_FALSE if it is not
- * available.
+ * @param[in] total_bytes_to_be_sent The total number of bytes to be sent.
+ * @return <code>PP_TRUE</code> if the upload progress is available,
+ * <code>PP_FALSE</code> if it is not available.
*/
PP_Bool (*GetUploadProgress)(PP_Resource loader,
int64_t* bytes_sent,
int64_t* total_bytes_to_be_sent);
/**
- * GetDownloadProgress is a pointer to a function that returns the current
- * download progress, which is meaningful after Open() has been called.
- * Progress only refers to the response body and does not include the
- * headers.
+ * GetDownloadProgress() returns the current download progress, which is
+ * meaningful after Open() has been called. Progress only refers to the
+ * response body and does not include the headers.
*
- * This data is only available if the URLRequestInfo passed to Open() had the
- * PP_URLREQUESTPROPERTY_REPORTDOWNLOADPROGRESS property set to PP_TRUE.
+ * This data is only available if the <code>URLRequestInfo</code> passed to
+ * Open() had the <code>PP_URLREQUESTPROPERTY_REPORTDOWNLOADPROGRESS</code>
+ * property set to <code>PP_TRUE</code>.
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
* @param[in] bytes_received The number of bytes received thus far.
- * @parm[in] total_bytes_to_be_received The total number of bytes to be
+ * @param[in] total_bytes_to_be_received The total number of bytes to be
* received. The total bytes to be received may be unknown, in which case
- * total_bytes_to_be_received will be set to -1.
- * @return PP_TRUE if the download progress is available, PP_FALSE if it is
- * not available.
+ * <code>total_bytes_to_be_received</code> will be set to -1.
+ * @return <code>PP_TRUE</code> if the download progress is available,
+ * <code>PP_FALSE</code> if it is not available.
*/
PP_Bool (*GetDownloadProgress)(PP_Resource loader,
int64_t* bytes_received,
int64_t* total_bytes_to_be_received);
/**
- * GetResponseInfo is a pointer to a function that returns the current
- * URLResponseInfo object.
+ * GetResponseInfo() returns the current <code>URLResponseInfo</code> object.
*
- * @param[in] instance A PP_Resource corresponding to a URLLoader.
- * @return A PP_Resource corresponding to the URLResponseInfo if successful,
- * 0 if the loader is not a valid resource or if Open() has not been called.
+ * @param[in] instance A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @return A <code>PP_Resource</code> corresponding to the
+ * <code>URLResponseInfo</code> if successful, 0 if the loader is not a valid
+ * resource or if Open() has not been called.
*/
PP_Resource (*GetResponseInfo)(PP_Resource loader);
/**
- * ReadResponseBody is a pointer to a function used to read the response
- * body. The size of the buffer must be large enough to hold the specified
- * number of bytes to read. This function might perform a partial read.
+ * ReadResponseBody() is used to read the response body. The size of the
+ * buffer must be large enough to hold the specified number of bytes to read.
+ * This function might perform a partial read.
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
- * @param[in/out] buffer A pointer to the buffer for the response body.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @param[in,out] buffer A pointer to the buffer for the response body.
* @param[in] bytes_to_read The number of bytes to read.
- * @param[in] callback A PP_CompletionCallback to run on asynchronous
- * completion. The callback will run if the bytes (full or partial) are
- * read or an error occurs asynchronously. This callback will run only if this
- * function returns PP_OK_COMPLETIONPENDING.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to run on
+ * asynchronous completion. The callback will run if the bytes (full or
+ * partial) are read or an error occurs asynchronously. This callback will
+ * run only if this function returns <code>PP_OK_COMPLETIONPENDING</code>.
* @return An int32_t containing the number of bytes read or an error code
- * from pp_errors.h.
+ * from <code>pp_errors.h</code>.
*/
int32_t (*ReadResponseBody)(PP_Resource loader,
void* buffer,
int32_t bytes_to_read,
struct PP_CompletionCallback callback);
/**
- * FinishStreamingToFile is a pointer to a function used to wait for the
- * response body to be completely downloaded to the file provided by the
- * GetBodyAsFileRef() in the current URLResponseInfo. This function is only
- * used if PP_URLREQUESTPROPERTY_STREAMTOFILE was set on the URLRequestInfo
- * passed to Open().
+ * FinishStreamingToFile() is used to wait for the response body to be
+ * completely downloaded to the file provided by the GetBodyAsFileRef()
+ * in the current <code>URLResponseInfo</code>. This function is only used if
+ * <code>PP_URLREQUESTPROPERTY_STREAMTOFILE</code> was set on the
+ * <code>URLRequestInfo</code> passed to Open().
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
- * @param[in] callback A PP_CompletionCallback to run on asynchronous
- * completion. This callback will run when body is downloaded or an error
- * occurs after FinishStreamingToFile() returns PP_OK_COMPLETIONPENDING.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to run on
+ * asynchronous completion. This callback will run when body is downloaded
+ * or an error occurs after FinishStreamingToFile() returns
+ * <code>PP_OK_COMPLETIONPENDING</code>.
* @return An int32_t containing the number of bytes read or an error code
- * from pp_errors.h.
+ * from <code>pp_errors.h</code>.
*/
int32_t (*FinishStreamingToFile)(PP_Resource loader,
struct PP_CompletionCallback callback);
/**
* Close is a pointer to a function used to cancel any pending IO and close
- * the URLLoader object. Any pending callbacks will still run, reporting
- * PP_ERROR_ABORTED if pending IO was interrupted. It is NOT valid to call
- * Open() again after a call to this function.
+ * the <code>URLLoader</code> object. Any pending callbacks will still run,
+ * reporting <code>PP_ERROR_ABORTED</code> if pending IO was interrupted.
+ * It is NOT valid to call Open() again after a call to this function.
*
- * Note: If the URLLoader object is destroyed while it is still open, then it
- * will be implicitly closed so you are not required to call Close().
+ * Note: If the <code>URLLoader</code> object is destroyed while it is still
+ * open, then it will be implicitly closed so you are not required to call
+ * Close().
*
- * @param[in] loader A PP_Resource corresponding to a URLLoader.
+ * @param[in] loader A <code>PP_Resource</code> corresponding to a
+ * <code>URLLoader</code>.
*/
void (*Close)(PP_Resource loader);
};
diff --git a/ppapi/c/ppp_instance.h b/ppapi/c/ppp_instance.h
index af09beb..40592d3 100644
--- a/ppapi/c/ppp_instance.h
+++ b/ppapi/c/ppp_instance.h
@@ -47,7 +47,7 @@ struct PPP_Instance_0_5 {
#endif
/**
* Creation handler that is called when a new instance is created. It is
- * called for each instantiation on the page, corresponding to one <embed>
+ * called for each instantiation on the page, corresponding to one \<embed\>
* tag on the page.
*
* Generally you would handle this call by initializing the information
@@ -69,15 +69,15 @@ struct PPP_Instance_0_5 {
* @param[in] argc The number of arguments contained in @a argn and @a argv.
*
* @param[in] argn An array of argument names. These argument names are
- * supplied in the <embed> tag, for example:
- * <embed id="nacl_module" dimensions="2"> will produce two argument
- * names: "id" and "dimensions."
+ * supplied in the \<embed\> tag, for example:
+ * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
+ * argument names: "id" and "dimensions."
*
* @param[in] argv An array of argument values. These are the values of the
- * arguments listed in the <embed> tag, for example
- * <embed id="nacl_module" dimensions="2"> will produce two argument
- * values: "nacl_module" and "2". The indices of these values match the
- * indices of the corresponding names in @a argn.
+ * arguments listed in the \<embed\> tag, for example
+ * <code>\<embed id="nacl_module" dimensions="2"\></code> will produce two
+ * argument values: "nacl_module" and "2". The indices of these values match
+ * the indices of the corresponding names in @a argn.
*
* @return @a PP_TRUE on success or @a PP_FALSE on failure.
*/
@@ -216,7 +216,7 @@ struct PPP_Instance_0_5 {
* @param[in] instance A PP_Instance indentifying the instance that should
* do the load.
*
- * @param[in] url_loader A PP_Resource an open PPB_URLLoader instance.
+ * @param[in] url_loader An open PPB_URLLoader instance.
*
* @return PP_TRUE if the data was handled, PP_FALSE otherwise.
*/