1885b47fbSopenharmony_ci/* 2885b47fbSopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3885b47fbSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4885b47fbSopenharmony_ci * you may not use this file except in compliance with the License. 5885b47fbSopenharmony_ci * You may obtain a copy of the License at 6885b47fbSopenharmony_ci * 7885b47fbSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8885b47fbSopenharmony_ci * 9885b47fbSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10885b47fbSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11885b47fbSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12885b47fbSopenharmony_ci * See the License for the specific language governing permissions and 13885b47fbSopenharmony_ci * limitations under the License. 14885b47fbSopenharmony_ci */ 15885b47fbSopenharmony_ci 16885b47fbSopenharmony_ci#include "parameter.h" 17885b47fbSopenharmony_ci#include "securec.h" 18885b47fbSopenharmony_ci 19885b47fbSopenharmony_ciint g_ret = 0; 20885b47fbSopenharmony_ci 21885b47fbSopenharmony_ciint SetParameter(const char *key, const char *value) 22885b47fbSopenharmony_ci{ 23885b47fbSopenharmony_ci (void)key; 24885b47fbSopenharmony_ci (void)value; 25885b47fbSopenharmony_ci return 0; 26885b47fbSopenharmony_ci} 27885b47fbSopenharmony_ci 28885b47fbSopenharmony_ciint GetParameter(const char *key, const char *def, char *value, unsigned int len) 29885b47fbSopenharmony_ci{ 30885b47fbSopenharmony_ci char name[5] = "true"; 31885b47fbSopenharmony_ci (void)memcpy_s(value, sizeof(name), name, sizeof(name)); 32885b47fbSopenharmony_ci (void)key; 33885b47fbSopenharmony_ci (void)def; 34885b47fbSopenharmony_ci (void)len; 35885b47fbSopenharmony_ci return 1; 36885b47fbSopenharmony_ci} 37885b47fbSopenharmony_ci 38885b47fbSopenharmony_ciint WatchParameter(const char *keyprefix, ParameterChgPtr callback, void *context) 39885b47fbSopenharmony_ci{ 40885b47fbSopenharmony_ci (void)keyprefix; 41885b47fbSopenharmony_ci (void)callback; 42885b47fbSopenharmony_ci (void)context; 43885b47fbSopenharmony_ci return g_ret; 44885b47fbSopenharmony_ci} 45885b47fbSopenharmony_ci 46885b47fbSopenharmony_ciint WaitParameter(const char *key, const char *value, int timeout) 47885b47fbSopenharmony_ci{ 48885b47fbSopenharmony_ci g_ret = timeout; 49885b47fbSopenharmony_ci return 0; 50885b47fbSopenharmony_ci}