• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2015 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.session;
18 
19 import android.graphics.Bitmap;
20 import android.net.Uri;
21 
22 /**
23  * Internal interface that e.g. a capture session can use to update about the
24  * status of session.
25  */
26 public interface SessionNotifier {
27     /** A new task has been queued. */
notifyTaskQueued(final Uri uri)28     public void notifyTaskQueued(final Uri uri);
29 
30     /** A task has finished processing. */
notifyTaskDone(final Uri uri)31     public void notifyTaskDone(final Uri uri);
32 
33     /** A task has failed to process. */
notifyTaskFailed(final Uri uri, final int failureMessageId, boolean removeFromFilmstrip)34     public void notifyTaskFailed(final Uri uri, final int failureMessageId,
35                                  boolean removeFromFilmstrip);
36 
37     /** A task has been canceled. */
notifyTaskCanceled(final Uri uri)38     public void notifyTaskCanceled(final Uri uri);
39 
40     /** A task has progressed. */
notifyTaskProgress(final Uri uri, final int progressPercent)41     public void notifyTaskProgress(final Uri uri, final int progressPercent);
42 
43     /** A task's current progress message has changed. */
notifyTaskProgressText(final Uri uri, final int messageId)44     public void notifyTaskProgressText(final Uri uri, final int messageId);
45 
46     /** The underlying session data has been updated. */
notifySessionUpdated(final Uri uri)47     public void notifySessionUpdated(final Uri uri);
48 
49     /** The capture indicator should be updated. */
notifySessionCaptureIndicatorAvailable(final Bitmap indicator, final int rotationDegrees)50     public void notifySessionCaptureIndicatorAvailable(final Bitmap indicator,
51             final int rotationDegrees);
52 
53     /** Notify that the full size thumbnail is available. */
notifySessionThumbnailAvailable(final Bitmap thumbnail)54     public void notifySessionThumbnailAvailable(final Bitmap thumbnail);
55 
56     /** Notify that the compressed picture data is available. */
notifySessionPictureDataAvailable(final byte[] pictureData, final int orientation)57     public void notifySessionPictureDataAvailable(final byte[] pictureData, final int orientation);
58 }
59