10a5c7a17Sopenharmony_ci/* 20a5c7a17Sopenharmony_ci * Copyright (c) 2020 Huawei Device Co., Ltd. 30a5c7a17Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 40a5c7a17Sopenharmony_ci * you may not use this file except in compliance with the License. 50a5c7a17Sopenharmony_ci * You may obtain a copy of the License at 60a5c7a17Sopenharmony_ci * 70a5c7a17Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 80a5c7a17Sopenharmony_ci * 90a5c7a17Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 100a5c7a17Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 110a5c7a17Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 120a5c7a17Sopenharmony_ci * See the License for the specific language governing permissions and 130a5c7a17Sopenharmony_ci * limitations under the License. 140a5c7a17Sopenharmony_ci */ 150a5c7a17Sopenharmony_ci#ifndef CAMERA_SERVER_H 160a5c7a17Sopenharmony_ci#define CAMERA_SERVER_H 170a5c7a17Sopenharmony_ci 180a5c7a17Sopenharmony_ci#include "camera_service.h" 190a5c7a17Sopenharmony_ci#include "ipc_skeleton.h" 200a5c7a17Sopenharmony_ci#include "camera_ability.h" 210a5c7a17Sopenharmony_ci 220a5c7a17Sopenharmony_cinamespace OHOS { 230a5c7a17Sopenharmony_cinamespace Media { 240a5c7a17Sopenharmony_ciclass CameraServer { 250a5c7a17Sopenharmony_cipublic: 260a5c7a17Sopenharmony_ci static CameraServer *GetInstance(); 270a5c7a17Sopenharmony_ci ~CameraServer() {} 280a5c7a17Sopenharmony_ci 290a5c7a17Sopenharmony_ci static void CameraServerRequestHandle(int funcId, void *origin, IpcIo *req, IpcIo *reply); 300a5c7a17Sopenharmony_ci void InitCameraServer(); 310a5c7a17Sopenharmony_ci void GetCameraAbility(IpcIo *req, IpcIo *reply); 320a5c7a17Sopenharmony_ci void GetCameraInfo(IpcIo *req, IpcIo *reply); 330a5c7a17Sopenharmony_ci void GetCameraIdList(IpcIo *req, IpcIo *reply); 340a5c7a17Sopenharmony_ci void CreateCamera(IpcIo *req, IpcIo *reply); 350a5c7a17Sopenharmony_ci void CloseCamera(IpcIo *req, IpcIo *reply); 360a5c7a17Sopenharmony_ci void SetCameraConfig(IpcIo *req, IpcIo *reply); 370a5c7a17Sopenharmony_ci void SetFrameConfig(IpcIo *req, IpcIo *reply); 380a5c7a17Sopenharmony_ci void TriggerLoopingCapture(IpcIo *req, IpcIo *reply); 390a5c7a17Sopenharmony_ci void StopLoopingCapture(IpcIo *req, IpcIo *reply); 400a5c7a17Sopenharmony_ci void TriggerSingleCapture(IpcIo *req, IpcIo *reply); 410a5c7a17Sopenharmony_ci void SetCameraCallback(IpcIo *req, IpcIo *reply); 420a5c7a17Sopenharmony_ci void OnTriggerSingleCaptureFinished(int32_t ret); 430a5c7a17Sopenharmony_ci void OnTriggerLoopingCaptureFinished(int32_t ret, int32_t streamId); 440a5c7a17Sopenharmony_ci void OnCameraStatusChange(int32_t ret, SvcIdentity *sid); 450a5c7a17Sopenharmony_ci void OnCameraConfigured(int32_t ret); 460a5c7a17Sopenharmony_ci void GetCameraModeNum(IpcIo *req, IpcIo *reply); 470a5c7a17Sopenharmony_ci void SetCameraMode(IpcIo *req, IpcIo *reply); 480a5c7a17Sopenharmony_ciprivate: 490a5c7a17Sopenharmony_ci CameraServer() 500a5c7a17Sopenharmony_ci { 510a5c7a17Sopenharmony_ci sid_.cookie = 0; 520a5c7a17Sopenharmony_ci } 530a5c7a17Sopenharmony_ci SvcIdentity sid_; 540a5c7a17Sopenharmony_ci}; 550a5c7a17Sopenharmony_ci} // namespace Media 560a5c7a17Sopenharmony_ci} // namespace OHOS 570a5c7a17Sopenharmony_ci#endif // CAMERA_SERVER_H 58