OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="url-loading"> | 3 <section id="url-loading"> |
4 <span id="devguide-coding-url-loading"></span><h1 id="url-loading"><span id="dev
guide-coding-url-loading"></span>URL Loading</h1> | 4 <span id="devguide-coding-url-loading"></span><h1 id="url-loading"><span id="dev
guide-coding-url-loading"></span>URL Loading</h1> |
5 <div class="contents local topic" id="contents"> | 5 <div class="contents local" id="contents" style="display: none"> |
6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
7 <li><a class="reference internal" href="#introduction" id="id1">Introduction</a>
</li> | 7 <li><a class="reference internal" href="#introduction" id="id1">Introduction</a>
</li> |
8 <li><a class="reference internal" href="#reference-information" id="id2">Referen
ce information</a></li> | 8 <li><a class="reference internal" href="#reference-information" id="id2">Referen
ce information</a></li> |
9 <li><a class="reference internal" href="#background" id="id3">Background</a></li
> | 9 <li><a class="reference internal" href="#background" id="id3">Background</a></li
> |
10 <li><p class="first"><a class="reference internal" href="#the-url-loader-example
" id="id4">The <code>url_loader</code> example</a></p> | 10 <li><p class="first"><a class="reference internal" href="#the-url-loader-example
" id="id4">The <code>url_loader</code> example</a></p> |
11 <ul class="small-gap"> | 11 <ul class="small-gap"> |
12 <li><a class="reference internal" href="#url-loading-overview" id="id5">URL load
ing overview</a></li> | 12 <li><a class="reference internal" href="#url-loading-overview" id="id5">URL load
ing overview</a></li> |
13 </ul> | 13 </ul> |
14 </li> | 14 </li> |
15 <li><p class="first"><a class="reference internal" href="#url-loader-deep-dive"
id="id6"><code>url_loader</code> deep dive</a></p> | 15 <li><p class="first"><a class="reference internal" href="#url-loader-deep-dive"
id="id6"><code>url_loader</code> deep dive</a></p> |
16 <ul class="small-gap"> | 16 <ul class="small-gap"> |
17 <li><a class="reference internal" href="#setting-up-the-request" id="id7">Settin
g up the request</a></li> | 17 <li><a class="reference internal" href="#setting-up-the-request" id="id7">Settin
g up the request</a></li> |
18 <li><a class="reference internal" href="#downloading-the-data" id="id8">Download
ing the data</a></li> | 18 <li><a class="reference internal" href="#downloading-the-data" id="id8">Download
ing the data</a></li> |
19 <li><a class="reference internal" href="#displaying-a-result" id="id9">Displayin
g a result</a></li> | 19 <li><a class="reference internal" href="#displaying-a-result" id="id9">Displayin
g a result</a></li> |
20 </ul> | 20 </ul> |
21 </li> | 21 </li> |
22 </ul> | 22 </ul> |
23 </div> | 23 |
24 <section id="introduction"> | 24 </div><section id="introduction"> |
25 <h2 id="introduction">Introduction</h2> | 25 <h2 id="introduction">Introduction</h2> |
26 <p>This chapter describes how to use the <a class="reference external" href="htt
ps://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_loader">URL
Loader API</a> | 26 <p>This chapter describes how to use the <a class="reference external" href="htt
ps://developers.google.com/native-client/peppercpp/classpp_1_1_u_r_l_loader">URL
Loader API</a> |
27 to load resources such as images and sound files from a server into your | 27 to load resources such as images and sound files from a server into your |
28 application.</p> | 28 application.</p> |
29 <p>The example discussed in this chapter is included in the SDK in the directory | 29 <p>The example discussed in this chapter is included in the SDK in the directory |
30 <code>examples/api/url_loader</code>.</p> | 30 <code>examples/api/url_loader</code>.</p> |
31 </section><section id="reference-information"> | 31 </section><section id="reference-information"> |
32 <h2 id="reference-information">Reference information</h2> | 32 <h2 id="reference-information">Reference information</h2> |
33 <p>For reference information related to loading data from URLs, see the | 33 <p>For reference information related to loading data from URLs, see the |
34 following documentation:</p> | 34 following documentation:</p> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 error or <code>PP_OK</code>.</p> | 223 error or <code>PP_OK</code>.</p> |
224 </section><section id="displaying-a-result"> | 224 </section><section id="displaying-a-result"> |
225 <h3 id="displaying-a-result">Displaying a result</h3> | 225 <h3 id="displaying-a-result">Displaying a result</h3> |
226 <p>OnRead calls <code>ReportResultAndDie</code> when either an error or <code>PP
_OK</code> is | 226 <p>OnRead calls <code>ReportResultAndDie</code> when either an error or <code>PP
_OK</code> is |
227 returned to indicate streaming of file is complete. <code>ReportResultAndDie</co
de> then | 227 returned to indicate streaming of file is complete. <code>ReportResultAndDie</co
de> then |
228 calls <code>ReportResult,</code> which calls <code>PostMessage</code> to send th
e result back to | 228 calls <code>ReportResult,</code> which calls <code>PostMessage</code> to send th
e result back to |
229 the HTML page.</p> | 229 the HTML page.</p> |
230 </section></section></section> | 230 </section></section></section> |
231 | 231 |
232 {{/partials.standard_nacl_article}} | 232 {{/partials.standard_nacl_article}} |
OLD | NEW |