2009/dap/gallery Overview.html,1.6,1.7

Update of /sources/public/2009/dap/gallery
In directory hutz:/tmp/cvs-serv371/2009/dap/gallery

Modified Files:
	Overview.html 
Log Message:
reformulating gallery api as a contact api

Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/gallery/Overview.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Overview.html	18 Mar 2010 08:53:13 -0000	1.6
+++ Overview.html	3 Nov 2010 09:58:29 -0000	1.7
@@ -46,29 +46,24 @@
 			<p>Opening the gallery and changing the view of gallery.</p>
 			<pre class="example sh_javascript_dom">
 				  		
-          // Define the changeView success callback function.
-          function changeViewSuccess() {
-                alert("Gallery contains "+ myGallery.getNumofMediaObjects() + " images");  
-          }
-
-          // Define the changeView failure callback function.
-          function changeViewFailure(e) {
-                alert("Cannot change gallery view");  
-          }
-
-          // Define the open Success callback function.
-          function openSuccess() {
-                alert("Gallery contains "+ myGallery.getNumofMediaObjects() + " media objects");
-                myGallery.changeView(changeViewSuccess, changeViewFailure, {order:gallery.MEDIA_SORT_BY_DESCENDING, firstViewOption:gallery.MEDIA_SORT_BY_FILEDATE})
-          }
+				function successGalleryFindCallback(mediaobject) {
+					// do something with resulting media objects
+					for (var i in mediaobject) alert(mediaobject[i].title);
+					// ...
+				}
 
-          // Define the open Failure callback function.
-          function openFailure(e) {
-                alert("Cannot open the gallery");
-          }
+				function generalErrorCB(error) {
+					// do something with resulting errors
+					alert(error.code);
+					// ...
+				}
 
-          // Open the gallery.
-          myGallery.open(openSuccess, openFailure);
+				// Search the media objects. initially filter the list to media objects containing 'seoul' in their metadata:
+				navigator.service.gallery.find(['keyword', 'description'],
+                                successGalleryFindCallback, 
+                                generalErrorCB,
+                                {filter: 'Seoul', firstSortOption:MEDIA_SORT_BY_DATE}
+                                );
 			</pre>
 		</div>
 	</section>
@@ -90,7 +85,7 @@
 </section>
 <section>
 	<h2>API Description</h2>
-	<section>
+	<!--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. 
@@ -101,7 +96,7 @@
 		  <dt>MediaGalleries getGalleries() </dt>
 		    <dd>Retrieve all galleries located on the device. </dd>
 		</dl>		
-	</section>	
+	</section-->	
 	<section id="gallery">
 		<h2><code>Gallery</code> interface</h2>
 		<p class="issue">The actual object of which the API will be hanging off is still under discussion (e.g. <code>navigator.service</code> vs from
@@ -117,23 +112,126 @@
 		    <dd>Constant used to identify sort by file date. </dd>
 		  <dt>const unsigned short MEDIA_SORT_BY_MEDIATYPE = 3</dt>
 		    <dd>Constant used to identify sort by media type. </dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_TITLE = 0</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_TITLE = 4</dt>
 		    <dd>Constant used to identify sort by title.</dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_AUTHOR = 1</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_AUTHOR = 5</dt>
 		    <dd>Constant used to identify sort by author.</dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_ALBUM = 2</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_ALBUM = 6</dt>
 		    <dd>Constant used to identify sort by album. </dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_DATE = 3</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_DATE = 7</dt>
 		    <dd>Constant used to identify sort by date</dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_ASCENDING = 0</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_ASCENDING = 8</dt>
 		    <dd>Constant used to identify ascending sort order.</dd>
-		  <dt>const unsigned short MEDIA_SORT_BY_DESCENDING = 1</dt>
+		  <dt>const unsigned short MEDIA_SORT_BY_DESCENDING = 9</dt>
 		    <dd>Constant used to identify ascending sort order. </dd>
-		  <dt>readonly attribute GalleryProperties metadata</dt>
-		    <dd>Generic metadata information regarding to the gallery.</dd>
-		  <dt>Unsigned long getNumofMediaObjects () </dt>
-		    <dd>Get the number of media objects in the gallery.</dd>
-		  <dt>PendingOp open () </dt>
+		  <!--dt>readonly attribute GalleryProperties metadata</dt>
+		    <dd>Generic metadata information regarding to the gallery.</dd-->
+		  <dt>readonly attribute unsigned long length</dt>
+		    <dd>the number of media objects in the gallery.</dd>
+
+		  <dt>
+            caller PendingOp find ()
+          </dt>
+          <dd>
+            <p>
+              Find media objects in the gallerys according to the <a>find process</a> detailed below.
+            </p>
+            <p>
+              This method takes two, three or four arguments. When called, it immediately returns a <code>PendingOp</code> object, as
+              defined in [[!CORE-DEVICE]], and then asynchronously starts a <dfn>find process</dfn> defined as follows:
+            </p>
+            <ol
+             class="rule">
+              <li>
+                If there are any <a>tasks</a> from the <a
+                 title="PendingOp task source"><code>PendingOp</code> task source</a> in one of the <a>task queues</a>
+                (i.e. an existing <code>find()</code> operation is still pending a response), and the current method was invoked with a
+                non-<code>null</code> <code>errorCB</code> argument, <a>dispatch an <code>error</code> event</a> with a <code>PENDING_OPERATION_ERROR</code> <code>code</code> value.
+              </li>
+              <li>
+                Search for media object in the galleries
+              </li>
+              <li>
+                If the attempt was successful, <a>dispatch a <code>success</code> event</a>. If the attempt fails, and the method was
+                invoked with a non-<code>null</code> <code>errorCB</code> argument, this method must <a>dispatch an <code>error</code>
+                event</a> with the <code>code</code> attribute set according to the type of failure that has occurred.
+              </li>
+            </ol>
+            <dl
+             class='parameters'>
+              <dt>
+                DOMString[] fields
+              </dt>
+              <dd>
+                The <a>search qualifier</a>.
+              </dd>
+              <dt>
+                GalleryFindCB successCB
+              </dt>
+              <dd>
+                Function to call when the asynchronous operation completes
+              </dd>
+              <dt>
+                optional GalleryErrorCB? errorCB
+              </dt>
+              <dd>
+                Function to call when the asynchronous operation fails.
+              </dd>
+              <dt>
+                optional GalleryFindOptions? options
+              </dt>
+              <dd>
+                The options to apply to the output of this method.
+              </dd>
+            </dl>
+          </dd>
+			
+          <dt>
+            caller PendingOp getGalleries ()
+          </dt>
+          <dd>
+            <p>
+              Retrieve all galleries from available sources(e.g. device local memory, external memory and even Fliker, Facebook, etc.) according to the <a>retrieve process</a> detailed below.
+            </p>
+            <p>
+              This method takes one or two arguments. When called, it immediately returns a <code>PendingOp</code> object, as
+              defined in [[!CORE-DEVICE]], and then asynchronously starts a <dfn>retrieve process</dfn> defined as follows:
+            </p>
+            <ol
+             class="rule">
+              <li>
+                If there are any <a>tasks</a> from the <a
+                 title="PendingOp task source"><code>PendingOp</code> task source</a> in one of the <a>task queues</a>
+                (i.e. an existing <code>find()</code> operation is still pending a response), and the current method was invoked with a
+                non-<code>null</code> <code>errorCB</code> argument, <a>dispatch an <code>error</code> event</a> with a <code>PENDING_OPERATION_ERROR</code> <code>code</code> value.
+              </li>
+              <li>
+                retrieve for all galleries
+              </li>
+              <li>
+                If the attempt was successful, <a>dispatch a <code>success</code> event</a>. If the attempt fails, and the method was
+                invoked with a non-<code>null</code> <code>errorCB</code> argument, this method must <a>dispatch an <code>error</code>
+                event</a> with the <code>code</code> attribute set according to the type of failure that has occurred.
+              </li>
+            </ol>
+            <dl
+             class='parameters'>
+              <dt>
+                GalleryFindCB successCB
+              </dt>
+              <dd>
+                Function to call when the asynchronous operation completes
+              </dd>
+              <dt>
+                optional GalleryErrorCB? errorCB
+              </dt>
+              <dd>
+                Function to call when the asynchronous operation fails.
+              </dd>
+            </dl>
+          </dd>
+		  
+		  <!--dt>PendingOp find () </dt>
 		    <dd>Open the gallery in the device.
 		      	<p>This method takes two arguments. When called, it immediately returns a <code>PendingOp</code> object, as defined in
       [[!CORE-DEVICE]] and then asynchronously start a <em>open gallery</em> process defined as follows:</p>
@@ -150,9 +248,30 @@
 			          <dd>Function to call when the asynchronous operation fails. This
 			            parameter is OPTIONAL.</dd>
 		      	</dl>
-		    </dd>
+		    </dd-->			
+			
+		  <!--dt>Unsigned long getNumofMediaObjects () </dt>
+		    <dd>Get the number of media objects in the gallery.</dd-->
+		  <!--dt>PendingOp open () </dt>
+		    <dd>Open the gallery in the device.
+		      	<p>This method takes two arguments. When called, it immediately returns a <code>PendingOp</code> object, as defined in
+      [[!CORE-DEVICE]] and then asynchronously start a <em>open gallery</em> process defined as follows:</p>
+		      	<ol>
+			        <li>Open the gallery. Allow application to access media objects of the gallery.</li>
+			        <li>If successful, invoke the associated <code>successCB</code>. If the attempt fails, and the method was invoked with a non-null
+			          <code>errorCallback</code> argument, this method must invoke the <code>errorCallback</code> with a <a
+			          href="#galleryerror-interface"><code>GalleryError</code></a> object as an argument. </li>
+		      	</ol>
+		      	<dl class="parameters">
+			        <dt>GallerySuccessCB successCB </dt>
+			          <dd>Function to call when the asynchronous operation completes </dd>
+			        <dt>optional GalleryErrorCB? errorCB </dt>
+			          <dd>Function to call when the asynchronous operation fails. This
+			            parameter is OPTIONAL.</dd>
+		      	</dl>
+		    </dd-->
 		    
-		  <dt>PendingOp refresh () </dt>
+		  <!--dt>PendingOp refresh () </dt>
 		    <dd>Refresh the media object(s) of gallery. 
 		      <p>This method takes two arguments. When called, it immediately returns a <code>PendingOp</code> object , as defined in
       [[!CORE-DEVICE]] and then asynchronously start a <em>refresh gallery</em> process
@@ -175,9 +294,9 @@
 		          <dd>Function to call when the asynchronous operation fails. This
 		            parameter is OPTIONAL.</dd>
 		      </dl>
-		    </dd>		    
+		    </dd-->		    
 
-		  <dt>PendingOp close () </dt>
+		  <!--dt>PendingOp close () </dt>
 		    <dd>Close the gallery in the device. Disallow application to access media objects of the gallery. 
 		    </dd>
 
@@ -206,69 +325,122 @@
 		          <dd>Describe details on the way to sort and filter media objects in
 		            the new view.</dd>
 		      </dl>
-		    </dd>
+		    </dd-->
 
-		  <dt>MediaObjects getMediaObjects () </dt>
+		  <!--dt>MediaObjects getMediaObjects () </dt>
 		    <dd>Retrieves the list of media object. Retrieves an array of Media Objects
 		      from the gallery according to current view options. If no view has been
 		      created, all items of the gallery are returned. 
 		      <p></p>
-		    </dd>
-		  <dt>MediaObject getMediaObject () </dt>
+		    </dd-->
+		  <!--dt>MediaObject getMediaObject () </dt>
 		    <dd>Retrieves the media object by id. The id of an media object never
 		      changes while gallery is open. 
 		      <dl class="parameters">
 		        <dt>unsigned long objectId </dt>
 		          <dd>Unique numberic id of the media object to be retrieved. </dd>
 		      </dl>
-		    </dd>		    
-		</dl>
-	</section>
-	<section>
-		<h2><code>GalleryProperties</code> interface</h2>
-		<p><code>GalleryProperties</code> interface capture generic metadata information of a gallery.</p>
-		<p class="note">More properties could be taken into account.</p>
-		<dl title="[NoInterfaceObject] interface GalleryProperties" class="idl">
-		  <dt>readonly attribute DOMString title</dt>
-		    <dd>The title of the gallery.</dd>
-		  <dt>readonly attribute Date createdDate</dt>
-		    <dd>The date and time the gallery was originally created.</dd>
-		  <dt>readonly attribute DOMString location</dt>
-		    <dd>The location the gallery is located on.</dd>
-		  <dt>readonly attribute DOMString[] supportedMediaObjectType</dt>
-		    <dd>A list of media object type supported by this gallery.</dd>		    		    
+		    </dd-->		    
 		</dl>
 	</section>
 	<section id="mediaobject">
 		<h2><code>MediaObject</code> interface</h2>
-		<p class="note"> The adding, updating, finding and deleting functions of media object should be defined</p>
+		<!--p class="note"> The adding, updating, finding and deleting functions of media object should be defined</p-->
 		<p><code>MediaObject</code> interface offer access to information regarding an each media object. A media object is a media file belonged to the gallery, that
 		is an video, audio or image file.</p>
 		
 
-		<dl title="[NoInterfaceObject] interface MediaObject" class="idl">
-		  <dt>const unsigned short MEDIA_OBJ_TYPE_UNDEFINED = 0</dt>
-		    <dd>Constant use to identify an undefined MediaObject. </dd>
-		  <dt>const unsigned short MEDIA_OBJ_TYPE_VIDEO = 1 </dt>
-		    <dd>Constant use to identify a video MediaObject.</dd>
-		  <dt>const unsigned short MEDIA_OBJ_TYPE_AUDIO = 2</dt>
-		    <dd>Constant use to identify an audio MediaObject.</dd>
-		  <dt>const unsigned short MEDIA_OBJ_TYPE_IMAGE = 3</dt>
-		    <dd>Constant use to identify an image MediaObject.</dd>
+		<dl title="[NoInterfaceObject] interface MediaObject : File" class="idl">
 		  <dt>readonly attribute unsigned long id</dt>
 		    <dd>Unique id of media object. This id is a unique numeric identifiers of
 		      the object. This id is persistent while the gallery is opened.</dd>
-		  <dt>readonly attribute unsigned long type</dt>
-		    <dd>Type of media object.</dd>
-		  <dt>readonly attribute unsigned DOMString mimeType</dt>
-		    <dd>Mimetype of the media file.</dd>
-		  <dt>readonly attribute unsigned DOMString filename</dt>
-		    <dd>The name of the file corresponding to this object.</dd>
-		  <dt>readonly attribute MediaObjectProperties metadata</dt>
-		    <dd>metadata associated to the media object.</dd>
+		  <dt>readonly attribute GalleryInfo gallery</dt>
+		    <dd>gallery information associated to the media object.</dd>			
+		  <!--dt>readonly attribute MediaObjectProperties metadata</dt>
+		    <dd>metadata associated to the media object.</dd-->
+		  <dt>readonly attribute DOMString? title</dt>
+		    <dd>The title of the media object.</dd>
+		  <dt>readonly attribute DOMString? language</dt>
+		    <dd>The language used in the media object.</dd>
+		  <dt>readonly attribute DOMString? locator</dt>
+		    <dd>The logical address at which the media object can be accessed.</dd>
+
+			<dt>readonly attribute DOMString? contributor</dt>
+		    <dd>The contributor related with the media object. e.g., actor, cameraman, director, singer, author, artist, etc.</dd>
+		  <dt>readonly attribute DOMString? creator</dt>
+		    <dd>The author of the media object.</dd>
+   		  <dt>readonly attribute Date? CreateDate</dt>
+		    <dd>The date and time the media object was originally created.</dd>
+			<dt>readonly attribute DOMString? location</dt>
+		    <dd>The description where the media object has been created, developed, recorded, or otherwise authored.</dd>
+
+		  <dt>readonly attribute DOMString? description</dt>
+		    <dd>A free-form text describing the content of the media object.</dd>
+		  <dt>readonly attribute DOMString? keyword</dt>
+		    <dd>A concept, descriptive phrase or keyword that specifies the topic of the media object.</dd>
+			<dt>readonly attribute DOMString? genre</dt>
+		    <dd>The category of the content of the media object.</dd>
+		  <dt>readonly attribute unsigned long? rating</dt>
+		    <dd>The rating value related with the media object.</dd>
+
+		  <dt>readonly attribute DOMString? relation</dt>
+		    <dd>The description related with resource that the current media object is related with.</dd>
+		  <dt>readonly attribute DOMString? collection</dt>
+		    <dd>The name of the collection from which the media object originates or to which it belongs.</dd>
+
+		  <dt>readonly attribute DOMString? copyright</dt>
+		    <dd>The copyright statement. Identification of the copyrights holder.</dd>
+		  <dt>readonly attribute DOMString? policy</dt>
+		    <dd>A policy statement (typically human-readable) associated with the media object.</dd>
+
+
+ 		  <dt>readonly attribute DOMString? publisher</dt>
+		    <dd>The publisher of a media object.</dd>
+		  <dt>readonly attribute DOMString? argetAudience</dt>
+		    <dd>The classification information related with media object including the issuer of the classification (e.g., a parental guidance issuing agency, or a targeted geographical region).</dd>
+
+		  <dt>readonly attribute DOMString? fragment</dt>
+		    <dd>A fragment identifier. A fragment is a portion of the resource</dd>
+		  <dt>readonly attribute DOMString? namedFragment</dt>
+		    <dd>A named fragment identifier.</dd>
+			
+		  <dt>readonly attribute unsigned long? frameSize</dt>
+		    <dd>The frame size of the media object (e.g., width and height of 720 and 480 units, respectively).</dd>
+		  <dt>readonly attribute DOMString? compression</dt>
+		    <dd>The compression type used.</dd>
+		  <dt>readonly attribute unsigned long? duration</dt>
+		    <dd>The actual duration of the media object.</dd>
+		  <dt>readonly attribute DOMString? format</dt>
+		    <dd>The MIME type of the media object (e.g., wrapper or bucket media types).</dd>
+		  <dt>readonly attribute unsigned long? samplingRate</dt>
+		    <dd>The audio sampling rate.</dd>
+		  <dt>readonly attribute unsigned long? framerate</dt>
+		    <dd>The video frame rate.</dd>
+		  <dt>readonly attribute unsigned long? averageBitRate</dt>
+		    <dd>The average bit rate.</dd>
+		  <dt>readonly attribute unsigned short? numTracks</dt>
+		    <dd>The number of tracks of a resource.</dd>
+		</dl>			
 		</dl>		
 	</section>
 	<section>
+		<h2><code>GalleryInfo</code> interface</h2>
+		<p><code>GalleryInfo</code> interface capture generic metadata information of a gallery.</p>
+		<p class="note">supportedMediaObjectType attribute is required? Other attribute could be taken into account.</p>
+		<dl title="[NoInterfaceObject] interface GalleryInfo" class="idl">
+		  <dt>readonly attribute DOMString title</dt>
+		    <dd>The title of the gallery.</dd>
+		  <dt>readonly attribute Date createdDate</dt>
+		    <dd>The date and time the gallery was originally created.</dd>
+		  <dt>readonly attribute DOMString location</dt>
+		    <dd>The location the gallery is located on.</dd>
+		  <dt>readonly attribute DOMString[] description</dt>
+		    <dd>>The description of the gallery.</dd>		    		    
+		  <dt>readonly attribute DOMString[] supportedMediaObjectType</dt>
+		    <dd>A list of media object type supported by this gallery.</dd>		    			
+		</dl>
+	</section>	
+	<!--section>
 		<h2><code>MediaObjectProperties</code> interface</h2>
 		<p><code>MediaObjectProperties</code> interface capture generic metadata information of a media object.</p>
 		<p class="note">More properties could be taken into account.</p>
@@ -287,30 +459,28 @@
 		  <dt>readonly attribute Date CreatedDate</dt>
 		    <dd>The date and time the media object was originally created.</dd>
 		</dl>
-	</section>
+	</section-->
 	<section>
-		<h2><code>ViewType</code> interface</h2>
-		<p><code>ViewType</code> interface offer the way to describe how gallery is displayed.</p>
-		<dl title="[NoInterfaceObject] interface ViewType" class="idl">
-		  <dt>attribute short order </dt>
-		    <dd>Specify wheither media objects are ordered in ascending or descending
-		      order. </dd>
-		  <dt>attribute short firstViewOption</dt>
+		<h2><code>GalleryFindOptions</code> interface</h2>
+		<p><code>GalleryFindOptions</code> interface describe the options that can be applied to media object searching and displaying.</p>
+		<dl title="[NoInterfaceObject] interface GalleryFindOptions" class="idl">
+		  <dt>attribute DOMString? filter </dt>
+		    <dd>A DOMString-based search filter with which to search. It's working based on the metadata of media object.</dd>
+		  <dt>attribute short? order </dt>
+		    <dd>Specify wheither media objects are ordered in ascending or descending order. Default is an ascending order. </dd>
+		  <dt>attribute short? firstSortOption</dt>
 		    <dd>Primary criteria to order the media object of the gallery.</dd>
-		  <dt>attribute short secondViewOption</dt>
+		  <dt>attribute short? secondSortOption</dt>
 		    <dd>Second criteria to order the media object of the gallery.</dd>
-		  <dt>attribute Data startDate </dt>
+		  <dt>attribute Date? startDate </dt>
 		    <dd>Start date for performing the search. Media object with date previous
 		      to that date will not be returned.</dd>
-		  <dt>attribute Data endDate</dt>
+		  <dt>attribute Date? endDate</dt>
 		    <dd>End date for performing the search. Media object with date later to
 		      that date will not be returned.</dd>
-		  <dt>attribute DOMString metaTag </dt>
-		    <dd>String to be searched in the metadata of media object on the
-		    gallery.</dd>
 		</dl>
 	</section>
-	<section id="mediagalleries-typedef">
+	<!--section id="mediagalleries-typedef">
 		<h2><code>MediaGalleries</code> typedef</h2>
 	
 		<p>The <code>MediaGalleries</code> typedef represents a <code>sequence</code> of <a href="#gallery"><code>Gallery</code></a>.</p>
@@ -323,38 +493,84 @@
 		<p>The <code>MediaObjects</code> typedef represents a <code>sequence</code> of <a href="#mediaobject"><code>MediaObject</code></a>.</p>
 		<dl title="typedef sequence&lt;MediaObject&gt; MediaObjects" class="idl">
 		</dl>
-	</section>
+	</section-->
+	<section>
+		<h2><code>GalleryFindCB</code> interface</h2>
+		<dl title="[Callback=FunctionOnly, NoInterfaceObject] interface GalleryFindCB : PendingOp" class="idl">
+		  <dt>void onSuccess (in MediaObject[] mediaObjectObjs)</dt>
+		    <dd><dl class="parameters">
+		        <dt>MediaObject[] mediaObjectObjs </dt>
+		          <dd>The Media Object resulting from the given Gallery find() method.</dd>
+		      </dl>
+		    </dd>			
+		</dl>		
+	</section>	
 	<section id="galleryerror-interface">
 		<h2><code>GalleryErrorCB</code> interface</h2>
-		<dl title="[Callback=FunctionOnly, NoInterfaceObject] interface GalleryErrorCB"	class="idl">
+		<dl title="[Callback=FunctionOnly, NoInterfaceObject] interface GalleryErrorCB : PendingOp"	class="idl">
 		  <dt>void onError () </dt>
 		    <dd><dl class="parameters">
-		        <dt>GalleryErrorCB error </dt>
-		          <dd>The error object of an unsuccessful asynchronous operation. </dd>
+		        <dt>GalleryError error </dt>
+		          <dd>The Gallery API related error object. </dd>
 		      </dl>
 		    </dd>
 		</dl>		
 	</section>
-	<section>
-		<h2><code>GallerySuccessCB</code> interface</h2>
-		<dl title="[Callback=FunctionOnly, NoInterfaceObject] interface GallerySuccessCB" class="idl">
-		  <dt>void onSuccess ()</dt>
-		    <dd>Callback function issued when the upper function is correctly finished.</dd>
-		</dl>		
-	</section>
+
 	<section>
 		<h2><code>GalleryError</code> interface</h2>
 		<p>The <code>GalleryError</code> interface encapsulates all errors in the Gallery API.</p>
 		
 		<p class="note">More error codes to be defined here. </p>
 		<dl title="[NoInterfaceObject] interface GalleryError" class="idl">
-		  <dt>const unsigned short GALLERY_OPEN_ERRER = 0 </dt>
-		    <dd>Gallery is already open. </dd>
-		  <dt>const unsigned short GALLERY_NOT_OPEN_ERRER = 1 </dt>
-		    <dd>Gallery is not open.</dd>
-		  <dt>readonly attribute unsigned short code </dt>
-		    <dd>An error code assigned by an implementation when an error has occurred
-		      in Gallery API processing.</dd>
+          <dt>
+            const unsigned short UNKNOWN_ERROR = 0
+          </dt>
+          <dd>
+            An unknown error occurred.
+          </dd>
+          <dt>
+            const unsigned short INVALID_ARGUMENT_ERROR = 1
+          </dt>
+          <dd>
+            An invalid parameter was provided when the requested method was invoked.
+          </dd>
+          <dt>
+            const unsigned short TIMEOUT_ERROR = 2
+          </dt>
+          <dd>
+            The requested method timed out before it could be completed.
+          </dd>
+          <dt>
+            const unsigned short PENDING_OPERATION_ERROR = 3
+          </dt>
+          <dd>
+            If the <a>user agent</a> is currently waiting for a callback on a current find() operation, as defined in this specification.
+          </dd>
+          <dt>
+            const unsigned short IO_ERROR = 4
+          </dt>
+          <dd>
+            An error occurred in communication with the underlying implementation that meant the requested method could not complete.
+          </dd>
+          <dt>
+            const unsigned short NOT_SUPPORTED_ERROR = 5
+          </dt>
+          <dd>
+            The requested method is not supported by the current implementation.
+          </dd>
+          <dt>
+            const unsigned short PERMISSION_DENIED_ERROR = 20
+          </dt>
+          <dd>
+            Access to the requested method was denied at the implementation or by the user.
+          </dd>
+          <dt>
+            readonly attribute unsigned short code
+          </dt>
+          <dd>
+            An error code assigned by an implementation when an error has occurred in Gallery API processing.
+          </dd>
 		</dl>		
 	</section>
 
@@ -365,27 +581,26 @@
 		<section>
 			<h2>Use Cases</h2>
 			<p>
-				<h4 id='uc1'>Use Case 1: TBD.				
+				<h4 id='uc1'>Use Case 1:</h4>
+				While uploading a photo to a web site, I'd like the  photos that are relevant in that context to be represented to me 
+				to select from. E.g. if I'm uploading a photo to a travel blog about Paris I'm probably only interested in photos from that area, thus I'd like 
+				those to be shown to me very prominently (I should still be able to select photos from other areas, if I want to).				
 			</p>
 			<p>
-				<h4 id='uc2'>Use Case 2: TBD.				
+				<h4 id='uc2'>Use Case 2: Picture album application</h4>
+				When user executes picture album app, this should list up the albums those were available from handset memory, external memory and even flickr,
+				facebook. There are a lot of different albums. Thus user would like to sort these by the specific metadata property like title, created date, etc. 
+				And in sometimes, user would like to look at some pictures those were taken in special place.
 			</p>
 		</section>
 		<section>
 			<h2>Requirements</h2>
 			<p>The Gallery API: </p>
 			<ul>
-			  <li>MUST enable listing all available gallery sources(e.g. specific
-			    directory, memory card, etc), their names and types</li>
-			  <li>MUST enable creating a new gallery?</li>
-			  <li>MUST enable finding and deleting a gallery?</li>
-			  <li>MUST enable finding a media object inside a gallery</li>
-			  <li>MUST enable adding, updating, and deleting a media object from a gallery
-			  </li>
-			  <li>MUST expose metadata about the gallery's media object (e.g. author,
-			    created date, copyright, media-dependent information, etc.)</li>
-			  <li>MUST enable filtering and ordering the list of media object according to
-			    various options (e.g. sorted by date)</li>
+			  <li>MUST enable listing all of galleries from available sources( e.g. local storage, memory card and even cloud services )</li>
+			  <li>MUST enable filtering and ordering the list of media object according to various options (e.g. sorted by date, title, geolocation, etc.)</li>
+			  <li>MUST expose metadata about the gallery's media object (e.g. author, created date, copyright, media-dependent information, etc.)</li>
+
 			</ul>
 		</section>		
 </section>

Received on Wednesday, 3 November 2010 09:58:34 UTC