1/*
2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef OHOS_CAMERA_ABILITY_IMPL_H
16#define OHOS_CAMERA_ABILITY_IMPL_H
17
18#include "camera_ability.h"
19
20namespace OHOS {
21namespace Media {
22class CameraAbilityImpl : public CameraAbility {
23public:
24    CameraAbilityImpl() {}
25    ~CameraAbilityImpl() = default;
26    std::list<int32_t> GetSupportedFormats() const;
27    std::list<CameraPicSize> GetSupportedSizes(int format) const;
28
29    template<typename T> int32_t SetParameterRange(uint32_t key, std::list<T> rangeList);
30    template<typename T> std::list<T> GetParameterRange(uint32_t key) const;
31
32private:
33    void SetSupportParameterRange(uint32_t key, std::list<CameraPicSize> &rangeList);
34    std::list<CameraPicSize> GetSupportParameterRange(uint32_t key) const;
35    bool IsParameterSupport(uint32_t key) const;
36    std::map<uint32_t, std::list<CameraPicSize>> SizeMap_;
37    std::set<uint32_t> supportProperties_;
38};
39} // namespace Media
40} // namespace OHOS
41
42#endif // OHOS_CAMERA_ABILITY_IMPL_H
43