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 OHOS_CAMERA_SERVICE_H
160a5c7a17Sopenharmony_ci#define OHOS_CAMERA_SERVICE_H
170a5c7a17Sopenharmony_ci
180a5c7a17Sopenharmony_ci#include "camera_device.h"
190a5c7a17Sopenharmony_ci#include "camera_service_callback.h"
200a5c7a17Sopenharmony_ci#include "camera_ability.h"
210a5c7a17Sopenharmony_ci#include "camera_info_impl.h"
220a5c7a17Sopenharmony_ci
230a5c7a17Sopenharmony_cinamespace OHOS {
240a5c7a17Sopenharmony_cinamespace Media {
250a5c7a17Sopenharmony_ciclass CameraService {
260a5c7a17Sopenharmony_cipublic:
270a5c7a17Sopenharmony_ci    ~CameraService();
280a5c7a17Sopenharmony_ci    static CameraService *GetInstance();
290a5c7a17Sopenharmony_ci
300a5c7a17Sopenharmony_ci    void Initialize();
310a5c7a17Sopenharmony_ci    CameraAbility *GetCameraAbility(std::string &cameraId);
320a5c7a17Sopenharmony_ci    CameraInfo *GetCameraInfo(std::string &cameraId);
330a5c7a17Sopenharmony_ci    CameraDevice *GetCameraDevice(std::string &cameraId);
340a5c7a17Sopenharmony_ci    int32_t CreateCamera(std::string cameraId);
350a5c7a17Sopenharmony_ci    int32_t CloseCamera(string cameraId);
360a5c7a17Sopenharmony_ci    list<string> GetCameraIdList();
370a5c7a17Sopenharmony_ci    uint8_t GetCameraModeNum();
380a5c7a17Sopenharmony_ci    int32_t SetCameraMode(uint8_t modeIndex);
390a5c7a17Sopenharmony_ciprivate:
400a5c7a17Sopenharmony_ci    CameraService();
410a5c7a17Sopenharmony_ci    int32_t InitCameraDevices();
420a5c7a17Sopenharmony_ci    std::map<string, CameraDevice*> deviceMap_;
430a5c7a17Sopenharmony_ci    std::map<string, CameraAbility*> deviceAbilityMap_;
440a5c7a17Sopenharmony_ci    std::map<string, CameraInfo*> deviceInfoMap_;
450a5c7a17Sopenharmony_ci    CameraServiceCallback *cameraServiceCb_ = nullptr;
460a5c7a17Sopenharmony_ci};
470a5c7a17Sopenharmony_ci} // namespace Media
480a5c7a17Sopenharmony_ci} // namespace OHOS
490a5c7a17Sopenharmony_ci
500a5c7a17Sopenharmony_ci#endif // OHOS_CAMERA_SERVICE_H