1 /* 2 * Copyright (C) 2023 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 FRAMEWORKS_MEDIATOOLS_COMMAND_RECV_COMMAND_V10_H_ 16 #define FRAMEWORKS_MEDIATOOLS_COMMAND_RECV_COMMAND_V10_H_ 17 #include "command/command.h" 18 19 namespace OHOS { 20 namespace Media { 21 namespace MediaTool { 22 class RecvCommandV10 : public Command { 23 public: 24 RecvCommandV10() = default; 25 ~RecvCommandV10() override = default; 26 RecvCommandV10(const RecvCommandV10 &recvCommand) = delete; 27 RecvCommandV10(RecvCommandV10 &&recvCommand) = delete; 28 RecvCommandV10 &operator=(const RecvCommandV10 &recvCommand) = delete; 29 RecvCommandV10 &operator=(RecvCommandV10 &&recvCommand) = delete; 30 int32_t Start(const ExecEnv &env) override; 31 int32_t RecvAssets(const ExecEnv& env, const std::string& tableName); 32 int32_t QueryAssets(std::shared_ptr<DataShare::DataShareResultSet>& resultSet, const std::string& tableName); 33 bool CheckArgs(const ExecEnv& env); 34 bool QueryMovingPhotoAsset(const string& movingPhotoImagePath, unique_ptr<FileAsset>& movingPhotoAsset); 35 bool IsMovingPhotoVideoPath(unique_ptr<FileAsset>& movingPhotoAsset); 36 37 private: 38 string srcPath_; 39 string inputPath_; 40 string uri_; 41 string tableName_; 42 43 bool isRecvAll_ = false; 44 }; 45 } // namespace MediaTool 46 } // namespace Media 47 } // namespace OHOS 48 #endif // FRAMEWORKS_MEDIATOOLS_COMMAND_RECV_COMMAND_V10_H_ 49