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 BUILD_RUST_TESTS_CLIENT_BLOBSTORE_H 16 #define BUILD_RUST_TESTS_CLIENT_BLOBSTORE_H 17 #include <memory> 18 #include "cxx.h" 19 20 namespace nsp_org { 21 namespace nsp_blobstore { 22 struct MultiBufs; 23 struct Metadata_Blob; 24 25 class client_blobstore { 26 public: 27 client_blobstore(); 28 uint64_t put_buf(MultiBufs &buf) const; 29 void add_tag(uint64_t blobid, rust::Str add_tag) const; 30 Metadata_Blob get_metadata(uint64_t blobid) const; 31 32 private: 33 class impl; 34 std::shared_ptr<impl> impl; 35 }; 36 37 std::unique_ptr<client_blobstore> blobstore_client_new(); 38 } // namespace nsp_blobstore 39 } // namespace nsp_org 40 #endif 41