• 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"); you may not use this file except
5  * in compliance with the License. You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the License
10  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11  * or implied. See the License for the specific language governing permissions and limitations under
12  * the License.
13  */
14 
15 package com.android.camera.burst;
16 
17 import java.util.Map;
18 
19 /**
20  * A listener to the various events generated during a burst.
21  */
22 public interface BurstResultsListener {
23     /**
24      * Called when burst starts.
25      */
onBurstStarted()26     public void onBurstStarted();
27 
28     /**
29      * Called when burst completes.
30      *
31      * @param burstResult the result of the captured burst.
32      */
onBurstCompleted(BurstResult burstResult)33     public void onBurstCompleted(BurstResult burstResult);
34 
35     /**
36      * Called when there is an unrecoverable error during capturing a burst.
37      * <p/>
38      * The burst failed with an unrecoverable error and did not produce any
39      * results.
40      */
onBurstError(Exception error)41     public void onBurstError(Exception error);
42 
43     /**
44      * Called when artifact count is available.
45      * <p/>
46      * This happens before the post processing phase.
47      *
48      * @param artifactTypeCount A map from the type of artifact to count of
49      *            artifact.
50      */
51     // TODO: Reconsider this method, perhaps return a Future for each artifact
52     // in the BurstResult.
onArtifactCountAvailable(Map<String, Integer> artifactTypeCount)53     public void onArtifactCountAvailable(Map<String, Integer> artifactTypeCount);
54 }
55