Home | History | Annotate | Download | only in gallery
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.camera.gallery;
     18 
     19 //
     20 // ImageList and Image classes have one-to-one correspondence.
     21 // The class hierarchy (* = abstract class):
     22 //
     23 //    IImageList
     24 //    - BaseImageList (*)
     25 //      - VideoList
     26 //      - ImageList
     27 //        - DrmImageList
     28 //    - SingleImageList (contains UriImage)
     29 //    - ImageListUber
     30 //
     31 //    IImage
     32 //    - BaseImage (*)
     33 //      - VideoObject
     34 //      - Image
     35 //        - DrmImage
     36 //    - UriImage
     37 //
     38 
     39 /**
     40  * The interface of all image collections used in gallery.
     41  */
     42 public interface IImageList {
     43 
     44     /**
     45      * Returns the count of image objects.
     46      *
     47      * @return       the number of images
     48      */
     49     public int getCount();
     50 
     51     /**
     52      * Returns the image at the ith position.
     53      *
     54      * @param i     the position
     55      * @return      the image at the ith position
     56      */
     57     public IImage getImageAt(int i);
     58 
     59     /**
     60      * Closes this list to release resources, no further operation is allowed.
     61      */
     62     public void close();
     63 }
     64