1 /* 2 * Copyright (C) 2023-2024 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 NET_DATASHARE_UTILS_IFACE_H 17 #define NET_DATASHARE_UTILS_IFACE_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace NetManagerStandard { 23 namespace { 24 constexpr const char *SHARING_WIFI_URI = 25 "datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA?Proxy=true&key=sharing_wifi"; 26 constexpr const char *SHARING_USB_URI = 27 "datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA?Proxy=true&key=sharing_usb"; 28 constexpr const char *SHARING_BLUETOOTH_URI = 29 "datashare:///com.ohos.settingsdata/entry/settingsdata/SETTINGSDATA?Proxy=true&key=sharing_bluetooth"; 30 31 constexpr const char *KEY_SHARING_WIFI = "settings.netmanager.sharing_wifi"; 32 constexpr const char *KEY_SHARING_USB = "settings.netmanager.sharing_usb"; 33 constexpr const char *KEY_SHARING_BLUETOOTH = "settings.netmanager.sharing_bluetooth"; 34 } // namespace 35 36 class NetDataShareHelperUtilsIface final { 37 public: 38 static int32_t Query(const std::string &strUri, const std::string &key, std::string &value); 39 static int32_t Insert(const std::string &strUri, const std::string &key, const std::string &value); 40 static int32_t Update(const std::string &strUri, const std::string &key, const std::string &value); 41 }; 42 } // namespace NetManagerStandard 43 } // namespace OHOS 44 #endif // NET_DATASHARE_UTILS_H