/* Copyright 2012 The Chromium Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* From ppb_url_loader.idl modified Thu Mar 28 10:07:37 2013. */ #ifndef PPAPI_C_PPB_URL_LOADER_H_ #define PPAPI_C_PPB_URL_LOADER_H_ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_macros.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" #define PPB_URLLOADER_INTERFACE_1_0 … #define PPB_URLLOADER_INTERFACE … /** * @file * This file defines the <strong>PPB_URLLoader</strong> interface for loading * URLs. */ /** * @addtogroup Interfaces * @{ */ /** * 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. * -# 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 <code>PPB_URLResponseInfo</code> for further information. * -# Call ReadResponseBody() to stream the data for the response. * * 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 <code>URLResponseInfo</code> returned in step #4. */ struct PPB_URLLoader_1_0 { … }; PPB_URLLoader; /** * @} */ #endif /* PPAPI_C_PPB_URL_LOADER_H_ */