blob: 38625218f3868ea7449c9acda53df8506bef8efc [file] [log] [blame]
Yin-Chia Yehb978c382019-10-30 00:22:37 -07001/*
2 * Copyright (C) 2019 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#ifndef ANDROID_SERVERS_CAMERA_CAMERAOFFLINESESSIONBASE_H
18#define ANDROID_SERVERS_CAMERA_CAMERAOFFLINESESSIONBASE_H
19
20#include <utils/RefBase.h>
21#include <utils/String8.h>
22#include <utils/Timers.h>
23
24#include "camera/CaptureResult.h"
25
26namespace android {
27
28class CameraOfflineSessionBase : public virtual RefBase {
29 public:
30 virtual ~CameraOfflineSessionBase();
31
32 // The session's original camera ID
33 virtual const String8& getId() const = 0;
34
35 virtual status_t disconnect() = 0;
36
37 virtual status_t dump(int fd) = 0;
38
39 virtual status_t abort() = 0;
40
41 /**
42 * Capture result passing
43 */
44 virtual status_t waitForNextFrame(nsecs_t timeout) = 0;
45
46 virtual status_t getNextResult(CaptureResult *frame) = 0;
47
48 // TODO: notification passing path
49}; // class CameraOfflineSessionBase
50
51} // namespace android
52
53#endif