1  /*
2   * Copyright (c) 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  #include "hks_lite_api.h"
17  #include "jsi.h"
18  #include "jsi_types.h"
19  
20  #include "hks_api.h"
21  #include "hks_param.h"
22  #include "hks_lite_api_common.h"
23  #include "hks_log.h"
24  
25  namespace OHOS {
26  namespace ACELite {
27  
getKeyProperties(const JSIValue thisVal,const JSIValue * args,uint8_t argsNum)28  JSIValue HksLiteModule::getKeyProperties(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum)
29  {
30      (void)thisVal;
31      (void)args;
32      (void)argsNum;
33  
34      JSIValue undefValue = JSI::CreateUndefined();
35      uint32_t minNumArgs = 3;
36      if (argsNum < minNumArgs || args == nullptr) {
37          HKS_LOG_E("getKeyProperties args invalid, args num(%{public}d).", argsNum);
38          return undefValue;
39      }
40  
41      HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], HKS_ERROR_API_NOT_SUPPORTED);
42      return undefValue;
43  }
44  }
45  }