--- a/gallery/index.html Wed Jun 27 11:07:53 2012 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,715 +0,0 @@
-<!DOCTYPE html>
-<!-- saved from url=(0035)http://dev.w3.org/2009/dap/gallery/ -->
-<html lang="en" dir="ltr">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>The Gallery API</title>
-
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 {
- text-transform: lowercase;
- font-variant: small-caps;
- font-style: normal;
- color: #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
- border: none;
-}
-
-dfn {
- font-weight: bold;
-}
-
-a.internalDFN {
- color: inherit;
- border-bottom: 1px solid #99c;
- text-decoration: none;
-}
-
-a.externalDFN {
- color: inherit;
- border-bottom: 1px dotted #ccc;
- text-decoration: none;
-}
-
-a.bibref {
- text-decoration: none;
-}
-
-code {
- color: #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
- border-top: 1px solid #90b8de;
- border-bottom: 1px solid #90b8de;
- padding: 1em;
- line-height: 120%;
-}
-
-pre.idl::before {
- content: "WebIDL";
- display: block;
- width: 150px;
- background: #90b8de;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-.idlType {
- color: #ff4500;
- font-weight: bold;
- text-decoration: none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID, .idlDictionaryID {
- font-weight: bold;
- color: #005a9c;
-}
-
-.idlSuperclass {
- font-style: italic;
- color: #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType, .idlMemberType {
- color: #005a9c;
-}
-.idlAttrName, .idlFieldName, .idlMemberName {
- color: #ff4500;
-}
-.idlAttrName a, .idlFieldName a, .idlMemberName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
- color: #005a9c;
-}
-.idlMethName {
- color: #ff4500;
-}
-.idlMethName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
- color: #005a9c;
-}
-.idlParamName {
- font-style: italic;
-}
-
-.extAttr {
- color: #666;
-}
-
-/*.idlConst*/
-.idlConstType {
- color: #005a9c;
-}
-.idlConstName {
- color: #ff4500;
-}
-.idlConstName a {
- color: #ff4500;
- border-bottom: 1px dotted #ff4500;
- text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
- font-weight: bold;
- color: #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
- color: #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
- color: #c00;
- font-weight: normal;
-}
-
-.excName a {
- font-family: monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
- border-bottom: 1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
- width: 45px;
- text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
-
-.idlImplements a {
- font-weight: bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields, dl.dictionary-members {
- margin-left: 2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
- font-weight: normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
- font-weight: bold;
- color: #000;
- font-family: monospace;
-}
-
-.attributes dt code, .fields dt code, .dictionary-members dt code {
- background: #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
- color: #005a9c;
- background: transparent;
- font-family: inherit;
- font-weight: normal;
- font-style: italic;
-}
-
-.methods dt code {
- background: #d9e6f8;
-}
-
-.constants dt code {
- background: #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd, .dictionary-members dd {
- margin-bottom: 1em;
-}
-
-table.parameters, table.exceptions {
- border-spacing: 0;
- border-collapse: collapse;
- margin: 0.5em 0;
- width: 100%;
-}
-table.parameters { border-bottom: 1px solid #90b8de; }
-table.exceptions { border-bottom: 1px solid #deb890; }
-
-.parameters th, .exceptions th {
- color: #fff;
- padding: 3px 5px;
- text-align: left;
- font-family: initial;
- font-weight: normal;
- text-shadow: #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
- padding: 3px 10px;
- border-top: 1px solid #ddd;
- vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
- border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
- width: 100px;
-}
-
-.parameters td.prmType {
- width: 120px;
-}
-
-table.exceptions table {
- border-spacing: 0;
- border-collapse: collapse;
- width: 100%;
-}
-
-/* --- TOC --- */
-.toc a {
- text-decoration: none;
-}
-
-a .secno {
- color: #000;
-}
-
-/* --- TABLE --- */
-table.simple {
- border-spacing: 0;
- border-collapse: collapse;
- border-bottom: 3px solid #005a9c;
-}
-
-.simple th {
- background: #005a9c;
- color: #fff;
- padding: 3px 5px;
- text-align: left;
-}
-
-.simple th[scope="row"] {
- background: inherit;
- color: inherit;
- border-top: 1px solid #ddd;
-}
-
-.simple td {
- padding: 3px 10px;
- border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
- background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
- margin-top: 0;
-}
-
-.section dd > p:last-child {
- margin-bottom: 0;
-}
-
-.section dd {
- margin-bottom: 1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
- margin-bottom: 0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
- border-top: 1px solid #ff4500;
- border-bottom: 1px solid #ff4500;
- padding: 1em;
- margin-top: 1em;
-}
-
-pre.example::before {
- content: "Example";
- display: block;
- width: 150px;
- background: #ff4500;
- color: #fff;
- font-family: initial;
- padding: 3px;
- font-weight: bold;
- margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
- padding: 1em;
- margin: 1em 0em 0em;
- border: 1px solid #f00;
- background: #ffc;
-}
-
-.issue::before {
- content: "Issue";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #f00;
- background: #fff;
- padding: 3px 1em;
-}
-
-.note {
- margin: 1em 0em 0em;
- padding: 1em;
- border: 2px solid #cff6d9;
- background: #e2fff0;
-}
-
-.note::before {
- content: "Note";
- display: block;
- width: 150px;
- margin: -1.5em 0 0.5em 0;
- font-weight: bold;
- border: 1px solid #cff6d9;
- background: #fff;
- padding: 3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
- border: solid #bebebe 1px;
- margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
- margin: 1.5em 0.5em 1em 1em;
- font-weight: bold;
- font-style: italic;
-}
-
-span.practicelab { background: #dfffff; }
-
-span.practicelab {
- position: relative;
- padding: 0 0.5em;
- top: -1.5em;
-}
-
-p.practicedesc {
- margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
- p.practicedesc {
- position: relative;
- top: -2em;
- padding: 0;
- margin: 1.5em 0.5em -1em 1em;
- }
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
- background-color: white;
- color: black;
- font-style: normal;
- font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; } /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; } /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: #ffc0cb; font-family: monospace; } /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; } /* comments */
-pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; } /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; } /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; } /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet" type="text/css" charset="utf-8"></head>
-
-<body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">The Gallery <acronym title="Application Programming Interface">API</acronym></h1><h2 id="w3c-editor-s-draft-02-may-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 02 May 2012</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/2009/dap/gallery/">http://dev.w3.org/2009/dap/gallery/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/gallery/">http://www.w3.org/TR/gallery/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2009/dap/gallery/">http://dev.w3.org/2009/dap/gallery/</a></dd><dt>Previous version:</dt><dd>none</dd><dt>Editors:</dt>
-<dd><span>송정기(Jungkee Song)</span>, <a href="http://www.samsung.com/sec/">Samsung Electronics Co., Ltd.</a></dd>
-<dd><span>이원석(Wonsuk Lee)</span>, <a href="http://www.samsung.com/sec/">Samsung Electronics Co., Ltd.</a></dd>
-</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2012 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr></div>
-
-<div id="abstract" class="introductory section"><h2>Abstract</h2><p>This specification defines a mechanism to pick and search media (image, video, audio) contents along with related metadata from media galleries.<br><br>
- This specification uses Web Intents to find and locate the registered galleries.
-</p></div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym> technical reports index</a> at http://www.w3.org/TR/.</em></p><p>This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as an Editor's Draft. If you wish to make comments regarding this document, please send them to <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a> (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>). All feedback is welcome.</p><p>Publication as an Editor's Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p></div>
- <div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#conformance" class="tocxref"><span class="secno">1. </span>Conformance</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#usage-examples" class="tocxref"><span class="secno">2.1 </span>Usage Examples</a></li></ul></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#api-description" class="tocxref"><span class="secno">3. </span><acronym title="Application Programming Interface">API</acronym> Description</a><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#media-object" class="tocxref"><span class="secno">3.1 </span><code>MediaObject</code> dictionary</a><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#attributes" class="tocxref"><span class="secno">3.1.1 </span>Dictionary <code>MediaObject</code> Members</a></li>
- </ul></li></ul></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#use-cases-and-requirements" class="tocxref"><span class="secno">4. </span>Use Cases and Requirements</a><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#use-cases" class="tocxref"><span class="secno">4.1 </span>Use Cases</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#requirements" class="tocxref"><span class="secno">4.2 </span>Requirements</a></li></ul></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#related-documents" class="tocxref"><span class="secno">A. </span>Related documents</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#features-for-future-consideration" class="tocxref"><span class="secno">B. </span>Features for Future Consideration</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#acknowledgements" class="tocxref"><span class="secno">C. </span>Acknowledgements</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#references" class="tocxref"><span class="secno">D. </span>References</a><ul class="toc">
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#normative-references" class="tocxref"><span class="secno">D.1 </span>Normative references</a></li>
- <li class="tocline"><a href="http://dev.w3.org/2009/dap/gallery/#informative-references" class="tocxref"><span class="secno">D.2 </span>Informative references</a></li></ul></li></ul>
- </div>
-
-<div id="conformance" class="section"><!--OddPage--><h2><span class="secno">1. </span>Conformance</h2><p>As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p>
-<p>The key words <em class="rfc2119" title="must">must</em>, <em class="rfc2119" title="must not">must not</em>, <em class="rfc2119" title="required">required</em>, <em class="rfc2119" title="should">should</em>, <em class="rfc2119" title="should not">should not</em>, <em class="rfc2119" title="recommended">recommended</em>, <em class="rfc2119" title="may">may</em>, and <em class="rfc2119" title="optional">optional</em> in this specification are to be interpreted as described in [<cite><a class="bibref" rel="biblioentry" href="http://dev.w3.org/2009/dap/gallery/#bib-RFC2119">RFC2119</a></cite>].</p>
-
-</div>
-
-<div class="informative section" id="introduction">
-
- <!--OddPage--><h2><span class="secno">2. </span>Introduction</h2><p><em>This section is non-normative.</em></p>
- <p>The Gallery <acronym title="Application Programming Interface">API</acronym> defines a high-level interface for accessing media gallery located on the device. A media gallery is a collection of media objects such as video, audio and image. </p>
- <p class="note">To achieve the simplicity in the browser level context, this specification defines only the read-only functionalities.</p>
- <div id="usage-examples" class="section">
- <h3><span class="secno">2.1 </span>Usage Examples</h3>
- <p>The following code shows how to work with the gallery <acronym title="Application Programming Interface">API</acronym>.</p>
- <p>Example of a image gallery service. The code registers a pick action for image pick service:</p>
- <div>
- <pre class="example"><html>
-<head>
-<meta charset='utf-8' />
-<title>Image Gallery Service</title>
-<intent action=”http://webintents.org/pick”
- type=”image/*”
- href=”http://example.org/ImageService/”
- title=”Example Image Service” />
-</head>
- </pre>
- </div>
- <p>A web application start a Web Intent request to pick images from registered galleries.</p>
- <div>
- <pre class="example sh_javascript_dom sh_sourceCode"><span class="sh_comment">// Client-ends request media service using Web Intents <b>pick</b> action</span>
-<span class="sh_comment">// The request of <b>image</b> pick service</span>
-
-<span class="sh_keyword">var</span> intent <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_predef_func">Intent</span><span class="sh_symbol">({</span>
- action<span class="sh_symbol">:</span> <span class="sh_string">"http://webintents.org/pick"</span><span class="sh_symbol">,</span>
- type<span class="sh_symbol">:</span> <span class="sh_string">"image/*"</span><span class="sh_symbol">,</span>
- extras<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> filter<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> name<span class="sh_symbol">:</span> <span class="sh_string">"Seoul"</span> <span class="sh_symbol">},</span> multiple<span class="sh_symbol">:</span> <span class="sh_predef_var">true</span> <span class="sh_symbol">}</span>
- <span class="sh_symbol">});</span>
-
-navigator<span class="sh_symbol">.</span><span class="sh_predef_func">startActivity</span><span class="sh_symbol">(</span>intent<span class="sh_symbol">,</span> galleryResponse<span class="sh_symbol">);</span>
-
-<span class="sh_keyword">function</span> <span class="sh_predef_func">galleryResponse</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span> <span class="sh_symbol">{</span>
- <span class="sh_comment">// Parse data encoded in an array of objects</span>
-<span class="sh_symbol">}</span></pre>
- </div>
- <p>Example of a video gallery service. The code registers a pick action for video pick service:</p>
- <div>
- <pre class="example"><html>
-<head>
-<meta charset='utf-8' />
-<title>Video Gallery Service</title>
-<intent action=”http://webintents.org/pick”
- type=”video/*”
- href=”http://example.org/VideoService/”
- title=”Example Video Service” />
-</head>
- </pre>
- </div>
- <p>A web application start a Web Intent request to pick videos from registered galleries.</p>
- <div>
- <pre class="example sh_javascript_dom sh_sourceCode"><span class="sh_comment">// Client-ends request media service using Web Intents <b>pick</b> action</span>
-<span class="sh_comment">// The request of <b>video</b> pick service</span>
-
-<span class="sh_keyword">var</span> intent <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_predef_func">Intent</span><span class="sh_symbol">({</span>
- action<span class="sh_symbol">:</span> <span class="sh_string">"http://webintents.org/pick"</span><span class="sh_symbol">,</span>
- type<span class="sh_symbol">:</span> <span class="sh_string">"video/*"</span><span class="sh_symbol">,</span>
- extras<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> filter<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> name<span class="sh_symbol">:</span> <span class="sh_string">"Family"</span> <span class="sh_symbol">},</span> multiple<span class="sh_symbol">:</span> <span class="sh_predef_var">true</span> <span class="sh_symbol">}</span>
- <span class="sh_symbol">});</span>
-
-navigator<span class="sh_symbol">.</span><span class="sh_predef_func">startActivity</span><span class="sh_symbol">(</span>intent<span class="sh_symbol">,</span> galleryResponse<span class="sh_symbol">);</span>
-
-<span class="sh_keyword">function</span> <span class="sh_predef_func">galleryResponse</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span> <span class="sh_symbol">{</span>
- <span class="sh_comment">// Parse data encoded in an array of objects</span>
-<span class="sh_symbol">}</span></pre>
- </div>
- <p>Example of a audio gallery service. The code registers a pick action for audio pick service:</p>
- <div>
- <pre class="example"><html>
-<head>
-<meta charset='utf-8' />
-<title>Audio Gallery Service</title>
-<intent action=”http://webintents.org/pick”
- type=”audio/*”
- href=”http://example.org/AudioService/”
- title=”Example Audio Service” />
-</head>
- </pre>
- </div>
- <p>A web application start a Web Intent request to pick audios from registered galleries.</p>
- <div>
- <pre class="example sh_javascript_dom sh_sourceCode"><span class="sh_comment">// Client-ends request media service using Web Intents <b>pick</b> action</span>
-<span class="sh_comment">// The request of <b>audio</b> pick service</span>
-
-<span class="sh_keyword">var</span> intent <span class="sh_symbol">=</span> <span class="sh_keyword">new</span> <span class="sh_predef_func">Intent</span><span class="sh_symbol">({</span>
- action<span class="sh_symbol">:</span> <span class="sh_string">"http://webintents.org/pick"</span><span class="sh_symbol">,</span>
- type<span class="sh_symbol">:</span> <span class="sh_string">"audio/*"</span><span class="sh_symbol">,</span>
- extras<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> filter<span class="sh_symbol">:</span> <span class="sh_symbol">{</span> name<span class="sh_symbol">:</span> <span class="sh_string">"Love"</span> <span class="sh_symbol">},</span> multiple<span class="sh_symbol">:</span> <span class="sh_predef_var">true</span> <span class="sh_symbol">}</span>
- <span class="sh_symbol">});</span>
-
-navigator<span class="sh_symbol">.</span><span class="sh_predef_func">startActivity</span><span class="sh_symbol">(</span>intent<span class="sh_symbol">,</span> galleryResponse<span class="sh_symbol">);</span>
-
-<span class="sh_keyword">function</span> <span class="sh_predef_func">galleryResponse</span><span class="sh_symbol">(</span>data<span class="sh_symbol">)</span> <span class="sh_symbol">{</span>
- <span class="sh_comment">// Parse data encoded in an array of objects</span>
-<span class="sh_symbol">}</span></pre>
- </div>
- <p class="note">Mediaobject (ImageObject, VideoObject and AudioObject) in schema.org might be used as type in case Web Intents specification adopts it.</p>
- <p class="note">Callback gets an array of objects, data, describing the content. Objects in data, in addition to other metadata fields, have either a url or a content field that would contain a Blob (i.e. the media content.)</p>
- </div>
-</div>
-
-<div id="api-description" class="section">
- <!--OddPage--><h2><span class="secno">3. </span><acronym title="Application Programming Interface">API</acronym> Description</h2>
- <!--section>
- <h2><code>Galleries</code> interface</h2>
- <p class="note"> More functions could be taked into account. e.g. How about finding function to the all galleries on the device? </p>
- <p><code>Galleries</code> interface offer access to the list of Media Galleries on the device. The number of galleries is dependent on the implementation.
- As an example, in a window mobile implementation it might retrieve the gallery located in the directory "\My Documents" and another on located on the memory card.</p>
-
-
- <dl title="[NoInterfaceObject] interface Galleries" class="idl">
- <dt>MediaGalleries getGalleries() </dt>
- <dd>Retrieve all galleries located on the device. </dd>
- </dl>
- </section-->
- <div id="media-object" class="section">
- <h3><span class="secno">3.1 </span><code>MediaObject</code> dictionary</h3>
- <p>The <code>MediaObject</code> dictionary exposes an object to deliver media contents and related metadata from web galleries and local galleries.</p>
- <p class="note">The metadata of the media contens and the search filters are to be defined.</p>
- <pre class="idl"><span class="idlDictionary" id="idl-def-MediaObject">dictionary</span> <span class="idlDictionaryID">MediaObject</span> {
-<span class="idlMember"> <span class="idlMemberType"><a>readonly attribute any</a></span> <span class="idlMemberName"><a href="#widl-MediaObject-content">content</a></span>;</span>
-<span class="idl">};</span>
-</pre><div id="attributes" class="section"><h4><span class="secno">3.1.1 </span>Dictionary <a class="idlType" href="#idl-def-MediaObject"><code>MediaObject</code></a> Members</h4><dl class="attributes"><dt id="widl-Gallery-length"><code>content</code> of type <span class="idlAttrType"><a>any</a></span>, readonly</dt><dd>the content of the media object.</dd></dl></div>
- <h3><span class="secno">3.2 </span>Discussion</h3>
- <p class="note">This section is only for dicussion and will be deleted.</p>
- <p>
- </p><h4>Content delivery method:</h4>
- Which is a better way, using a url or a blob?<br>
-<ul><li> a URL (Blob URI is used for local contents: http://www.w3.org/TR/FileAPI/#creating-revoking)
- <br>
- Advantage: Web application developers do not have to take complex part of blob reception.
- <br>
- Disadvantage: for remote contents, developers cannot manipulate the contents in script (other than assigning them to image/video/audio element) unless the remote service has enabled CORS.
-</li>
-<li> a Blob
- <br>
- Advantage: no matter whether the galleries are remote or local, developers can manipulate the received contents in the same way.
- <br>
- Disadvantage: When retrieving huge amount of data from the galleries, a naïve implementation might think it needs to download entire contents before exposing blobs. In fact, blob reading can be done, through FileReader, on demand. (FileReader even provides Progress Events, but it does require an implementation of Blob that supports this sort of usage.)
-</li></ul>
-
- <p></p>
- <p>
- </p><h4><em>extra</em> attribute in Web Intents request</h4>
- When extra attribute is not given, the request is regarded a search for everything and pick just one; when extra is given, the request is regarded as a specific content search.
- <p></p>
- <p>
- </p><h4><em>multiple</em> attribute in <em>extra</em> parameter:</h4>
- When set to true, <em>mutiple</em> attribute in <em>extra</em> paramenter means a client wants to retrieve contents from multiple media sources. Search filter should filter what the user sees in the picker, and the user still decides what is returned (which can be everything of course).
- <p></p>
- <br>
-
-<div id="use-cases-and-requirements" class="section">
- <!--OddPage--><h2><span class="secno">4. </span>Use Cases and Requirements</h2>
- <div id="use-cases" class="section">
- <h3><span class="secno">4.1 </span>Use Cases</h3>
- <p>
- </p><h4 id="uc1">Picking image:</h4>
- A user picks an image or a set of images either from web galleries (e.g. Flickr, Piscasa, etc.) or from local gallery.
- <p></p>
- <p>
- </p><h4 id="uc2">Picking video:</h4>
- A user picks a video or a set of videos either from web galleries (e.g. YouTube, DailyMotion, etc.) or from local gallery.
- <p></p>
- <p>
- </p><h4 id="uc3">Picking audio:</h4>
- A user picks an audio or a set of audio either from web galleries (e.g. SoundCloud, Last.fm, etc.) or from local gallery.
- <p></p>
- <br>
- <p class="note">Advantage: it makes integrating with popular services like Flickr, Youtube, SoundCloud a lot easier.</p>
- </div>
- <div id="requirements" class="section">
- <h3><span class="secno">4.2 </span>Requirements</h3>
- <p>The Gallery <acronym title="Application Programming Interface">API</acronym>: </p>
- <ul>
- <li><em class="rfc2119" title="must">must</em> provide the ability to list the galleries from available sources (e.g. local storage, memory card and web services such as Flickr, YouTube, SoundCloud, etc.) – by Web Intents</li>
- <li><em class="rfc2119" title="must">must</em> provide the ability to enumerate the media objects in the designated gallery.</li>
- <li><em class="rfc2119" title="must">must</em> provide the ability to filter the media objects in the designated gallery. i.e. finding content inside a gallery (e.g. date, title, geolocation, etc.)</li>
- <li><em class="rfc2119" title="must">must</em> provide the ability to retrieve the metadata of the media objects in the gallery (the metadata format is to be defined later through e.g. the MediaObjects in schema.org or the model in JS, etc.)</li>
- </ul>
- </div>
-</div>
-
-<div class="appendix section" id="related-documents">
- <!--OddPage--><h2><span class="secno">A. </span>Related documents</h2>
- <p>The <acronym title="Application Programming Interface">API</acronym> described in this document took inspiration from the following documents:</p>
- <ul>
- <li><a href="http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html" name="WebIntents" id="WebIntents">Web Intents</acronym></a> </li>
- </ul>
-</div>
-<div id="features-for-future-consideration" class="section">
- <!--OddPage--><h2><span class="secno">B. </span>Features for Future Consideration</h2>
- <p>This is a list of features that have been discussed with respect to this version of the <acronym title="Application Programming Interface">API</acronym> but for which it has been decided that if they are
- included it will be in a future revision. </p>
- <ul>
- <li>...</li>
- </ul>
-</div>
-<div class="appendix section" id="acknowledgements">
- <!--OddPage--><h2><span class="secno">C. </span>Acknowledgements</h2>
- <p>Many thanks to Robin Berjon for making our lives so much easier with his cool tool.</p>
-</div>
-
-
-<div id="references" class="appendix section"><!--OddPage--><h2><span class="secno">D. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">D.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-CORE-DEVICE">[A Blob URI]</dt><dd>Arun Ranganathan; Jonas Sicking. <a href="http://www.w3.org/TR/FileAPI/#creating-revoking"><cite>A Blob URI.</cite></a> 20 October 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/FileAPI/#creating-revoking">http://www.w3.org/TR/FileAPI/#creating-revoking</a>
-</dd><dt id="bib-RFC2119">[Web Intents]</dt><dd>Greg Billock; James Hawkins; Paul Kinlan. <a href="http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html"><cite>Web Intents.</cite></a> 27 April 2012. W3C Editor's Draft. (Work in progress.) URL: <a href="http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html">http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">D.2 </span>Informative references</h3><p>No informative references.</p></div></div></body></html>
\ No newline at end of file