ICameraService.h revision 3cf613507f1e2f7bd932d921a6e222e426fd3be4
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_ICAMERASERVICE_H 183cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#define ANDROID_HARDWARE_ICAMERASERVICE_H 193cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 203cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <utils/RefBase.h> 213cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <binder/IInterface.h> 223cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <binder/Parcel.h> 233cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 243cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <camera/ICameraClient.h> 253cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#include <camera/ICamera.h> 263cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 273cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopiannamespace android { 283cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 293cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianclass ICameraService : public IInterface 303cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian{ 313cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianpublic: 323cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian enum { 333cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian CONNECT = IBinder::FIRST_CALL_TRANSACTION, 343cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian }; 353cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 363cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianpublic: 373cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian DECLARE_META_INTERFACE(CameraService); 383cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 393cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian virtual sp<ICamera> connect(const sp<ICameraClient>& cameraClient) = 0; 403cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; 413cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 423cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian// ---------------------------------------------------------------------------- 433cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 443cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianclass BnCameraService: public BnInterface<ICameraService> 453cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian{ 463cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopianpublic: 473cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian virtual status_t onTransact( uint32_t code, 483cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian const Parcel& data, 493cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian Parcel* reply, 503cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian uint32_t flags = 0); 513cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; 523cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 533cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian}; // namespace android 543cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian 553cf613507f1e2f7bd932d921a6e222e426fd3be4Mathias Agopian#endif 56