13cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian/* 23cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * Copyright (C) 2008 The Android Open Source Project 33cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * 43cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * Licensed under the Apache License, Version 2.0 (the "License"); 53cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * you may not use this file except in compliance with the License. 63cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * You may obtain a copy of the License at 73cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * 83cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * http://www.apache.org/licenses/LICENSE-2.0 93cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * 103cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * Unless required by applicable law or agreed to in writing, software 113cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * distributed under the License is distributed on an "AS IS" BASIS, 123cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * See the License for the specific language governing permissions and 143cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian * limitations under the License. 153cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian */ 163cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 173cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#ifndef ANDROID_HARDWARE_ICAMERA_APP_H 183cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#define ANDROID_HARDWARE_ICAMERA_APP_H 193cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 203cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <utils/RefBase.h> 213cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <binder/IInterface.h> 223cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <binder/Parcel.h> 233cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <binder/IMemory.h> 243cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <utils/Timers.h> 2557c86189bc07d9ccb0fd044e66df736d0bf19639Wu-cheng Li#include <system/camera.h> 263cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 273cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopiannamespace android { 283cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 293cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianclass ICameraClient: public IInterface 303cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian{ 31bef3f23f16f2fc575b3f425febcfcc436a7db70fIgor Murashkin /** 32bef3f23f16f2fc575b3f425febcfcc436a7db70fIgor Murashkin * Keep up-to-date with ICameraClient.aidl in frameworks/base 33bef3f23f16f2fc575b3f425febcfcc436a7db70fIgor Murashkin */ 343cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianpublic: 353cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian DECLARE_META_INTERFACE(CameraClient); 363cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 373cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian virtual void notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2) = 0; 3857c86189bc07d9ccb0fd044e66df736d0bf19639Wu-cheng Li virtual void dataCallback(int32_t msgType, const sp<IMemory>& data, 3957c86189bc07d9ccb0fd044e66df736d0bf19639Wu-cheng Li camera_frame_metadata_t *metadata) = 0; 403cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian virtual void dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& data) = 0; 413cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; 423cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 433cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian// ---------------------------------------------------------------------------- 443cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 453cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianclass BnCameraClient: public BnInterface<ICameraClient> 463cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian{ 473cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianpublic: 483cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian virtual status_t onTransact( uint32_t code, 493cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian const Parcel& data, 503cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian Parcel* reply, 513cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian uint32_t flags = 0); 523cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; 533cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 543cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; // namespace android 553cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 563cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#endif 57