blob: 3ea49f4188abf33c274696c6e5c64b1da35f530c [file] [log] [blame]
Igor Murashkine7ee7632013-06-11 18:10:18 -07001/*
2 * Copyright (C) 2013 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_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H
18#define ANDROID_HARDWARE_PHOTOGRAPHY_ICAMERADEVICEUSER_H
19
20#include <binder/IInterface.h>
21#include <binder/Parcel.h>
22
23struct camera_metadata;
24
25namespace android {
26
27class ICameraDeviceUserClient;
28class IGraphicBufferProducer;
29class Surface;
30class CaptureRequest;
31class CameraMetadata;
32
33class ICameraDeviceUser : public IInterface
34{
35 /**
36 * Keep up-to-date with ICameraDeviceUser.aidl in frameworks/base
37 */
38public:
39 DECLARE_META_INTERFACE(CameraDeviceUser);
40
41 virtual void disconnect() = 0;
42
43 /**
44 * Request Handling
45 **/
46
47 virtual int submitRequest(sp<CaptureRequest> request,
48 bool streaming = false) = 0;
49 virtual status_t cancelRequest(int requestId) = 0;
50
51 virtual status_t deleteStream(int streamId) = 0;
52 virtual status_t createStream(
53 int width, int height, int format,
54 const sp<IGraphicBufferProducer>& bufferProducer) = 0;
55
56 // Create a request object from a template.
57 virtual status_t createDefaultRequest(int templateId,
58 /*out*/
59 CameraMetadata* request) = 0;
60 // Get static camera metadata
Igor Murashkin099b4572013-07-12 17:52:16 -070061 virtual status_t getCameraInfo(/*out*/
62 CameraMetadata* info) = 0;
Igor Murashkine7ee7632013-06-11 18:10:18 -070063
64};
65
66// ----------------------------------------------------------------------------
67
68class BnCameraDeviceUser: public BnInterface<ICameraDeviceUser>
69{
70public:
71 virtual status_t onTransact( uint32_t code,
72 const Parcel& data,
73 Parcel* reply,
74 uint32_t flags = 0);
75};
76
77}; // namespace android
78
79#endif