1 /* 2 * Copyright (c) 2023-2025 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 16 #ifndef CAMERA_ROTATE_STRATEGY_PARSER_H 17 #define CAMERA_ROTATE_STRATEGY_PARSER_H 18 19 #include <unordered_map> 20 #include <string> 21 #include <sstream> 22 23 #include "camera_log.h" 24 #include "parser.h" 25 #include "camera_xml_parser.h" 26 27 namespace OHOS { 28 namespace CameraStandard { 29 using namespace std; 30 31 class CameraRotateStrategyParser : public Parser { 32 public: 33 void Destroy() final; 34 CameraRotateStrategyParser()35 CameraRotateStrategyParser() 36 { 37 curNode_ = CameraXmlNode::Create(); 38 MEDIA_DEBUG_LOG("CameraRotateStrategyParser ctor"); 39 } 40 ~CameraRotateStrategyParser()41 ~CameraRotateStrategyParser() 42 { 43 MEDIA_DEBUG_LOG("CameraRotateStrategyParser dtor"); 44 Destroy(); 45 curNode_ = nullptr; 46 } 47 48 private: 49 std::shared_ptr<CameraXmlNode> curNode_ = nullptr; 50 }; 51 } // namespace CameraStandard 52 } // namespace OHOS 53 54 #endif // CAMERA_ROTATE_STRATEGY_PARSER_H