• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 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.one;
18 
19 import com.android.camera.device.CameraId;
20 import com.android.camera.one.OneCamera.Facing;
21 
22 /**
23  * The camera manager is responsible for providing details about the
24  * available camera hardware on the current device.
25  */
26 public interface OneCameraManager {
27 
28     /**
29      * Returns true if this hardware platform currently has any cameras at
30      * all.
31      */
hasCamera()32     public boolean hasCamera();
33 
34     /**
35      * Returns whether the device has a camera facing the given direction.
36      */
hasCameraFacing(Facing facing)37     public boolean hasCameraFacing(Facing facing);
38 
39     /**
40      * Get a platform specific device key for the first camera in the list
41      * of all camera devices.
42      */
findFirstCamera()43     public CameraId findFirstCamera();
44 
45     /**
46      * Get a platform specific device key for a camera facing a particular
47      * direction.
48      */
findFirstCameraFacing(Facing facing)49     public CameraId findFirstCameraFacing(Facing facing);
50 
51     /**
52      * Retrieve the characteristics for the camera facing at the given
53      * direction. The first camera found in the given direction will be chosen.
54      *
55      * @return A #{link com.android.camera.one.OneCameraCharacteristics} object
56      *         to provide camera characteristics information. Returns null if
57      *         there is no camera facing the given direction.
58      */
getOneCameraCharacteristics(CameraId cameraId)59     public OneCameraCharacteristics getOneCameraCharacteristics(CameraId cameraId)
60           throws OneCameraAccessException;
61 
62     public static class Factory {
63 
64     }
65 }