blob: 2613c015b7c8bca0cb9bb8d9881298aec6f252ed [file] [log] [blame]
Ruben Brunk2823ce02015-05-19 17:25:13 -07001/*
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#ifndef ANDROID_HARDWARE_ICAMERASERVICEPROXY_H
18#define ANDROID_HARDWARE_ICAMERASERVICEPROXY_H
19
20#include <utils/RefBase.h>
21#include <binder/IInterface.h>
22#include <binder/Parcel.h>
23
24namespace android {
25
Eino-Ville Talvala412fe562015-08-20 17:08:32 -070026/**
27 * Interface from native camera service to managed-side camera service proxy.
28 *
29 * Keep in sync with frameworks/base/core/java/android/hardware/ICameraServiceProxy.aidl
30 *
31 */
Ruben Brunk2823ce02015-05-19 17:25:13 -070032class ICameraServiceProxy : public IInterface {
33public:
34 enum {
35 PING_FOR_USER_UPDATE = IBinder::FIRST_CALL_TRANSACTION,
Eino-Ville Talvala412fe562015-08-20 17:08:32 -070036 NOTIFY_CAMERA_STATE
37 };
38
39 enum CameraState {
40 CAMERA_STATE_OPEN,
41 CAMERA_STATE_ACTIVE,
42 CAMERA_STATE_IDLE,
43 CAMERA_STATE_CLOSED
Ruben Brunk2823ce02015-05-19 17:25:13 -070044 };
45
46 DECLARE_META_INTERFACE(CameraServiceProxy);
47
48 virtual void pingForUserUpdate() = 0;
Eino-Ville Talvala412fe562015-08-20 17:08:32 -070049 virtual void notifyCameraState(String16 cameraId, CameraState newCameraState) = 0;
Ruben Brunk2823ce02015-05-19 17:25:13 -070050};
51
52class BnCameraServiceProxy: public BnInterface<ICameraServiceProxy>
53{
54public:
55 virtual status_t onTransact( uint32_t code,
56 const Parcel& data,
57 Parcel* reply,
58 uint32_t flags = 0);
59};
60
61
62
63}; // namespace android
64
65#endif // ANDROID_HARDWARE_ICAMERASERVICEPROXY_H