1 /* 2 * Copyright (C) 2021 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 HDC_SYSTEM_DEPEND_H 16 #define HDC_SYSTEM_DEPEND_H 17 #include "daemon_common.h" 18 19 namespace Hdc { 20 namespace SystemDepend { 21 #ifdef HDC_SUPPORT_FLASHD 22 // deprecated, remove later GetDevItem(const char * key,string value)23 inline bool GetDevItem(const char *key, string value) 24 { 25 return false; 26 }; SetDevItem(const char * key,const char * value)27 inline bool SetDevItem(const char *key, const char *value) 28 { 29 return false; 30 }; 31 #else 32 bool GetDevItem(const char *key, string &out, const char *preDefine = nullptr); 33 bool SetDevItem(const char *key, const char *value); 34 #endif 35 bool RebootDevice(const string &cmd); 36 } // namespace SystemDepend 37 } // namespace Hdc 38 39 #endif // HDC_BASE_H 40