1 /* 2 * Copyright (c) 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 DISTRIBUTED_FILE_IPC_WRAPPER_H 17 #define DISTRIBUTED_FILE_IPC_WRAPPER_H 18 19 #include <dirent.h> 20 #include <memory> 21 #include <string> 22 23 #include "message_parcel.h" 24 25 namespace OHOS { 26 namespace Storage { 27 namespace DistributedFile { 28 class IpcWrapper { 29 public: 30 static bool WriteUriByRawData(MessageParcel &data, const std::vector<std::string> &uriVec); 31 static bool WriteBatchUris(MessageParcel &data, const std::vector<std::string> &uriVec); 32 static bool GetData(void *&buffer, size_t size, const void *data); 33 static bool ReadBatchUriByRawData(MessageParcel &data, std::vector<std::string> &uriVec); 34 static int32_t ReadBatchUris(MessageParcel &data, std::vector<std::string> &uriVec); 35 }; 36 } // namespace DistributedFile 37 } // namespace Storage 38 } // namespace OHOS 39 #endif // DISTRIBUTED_FILE_IPC_WRAPPER_H 40