1 /* 2 * Copyright (c) 2021-2022 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 I18N_UNICODE_ADDON_H 16 #define I18N_UNICODE_ADDON_H 17 18 #include "napi/native_api.h" 19 #include "napi/native_node_api.h" 20 21 namespace OHOS { 22 namespace Global { 23 namespace I18n { 24 class I18nUnicodeAddon { 25 public: 26 I18nUnicodeAddon(); 27 ~I18nUnicodeAddon(); 28 static void Destructor(napi_env env, void *nativeObject, void *hint); 29 static napi_value InitI18nUnicode(napi_env env, napi_value exports); 30 static napi_value InitCharacter(napi_env env, napi_value exports); 31 32 private: 33 static napi_value IsDigitAddon(napi_env env, napi_callback_info info); 34 static napi_value IsSpaceCharAddon(napi_env env, napi_callback_info info); 35 static napi_value IsWhiteSpaceAddon(napi_env env, napi_callback_info info); 36 static napi_value IsRTLCharacterAddon(napi_env env, napi_callback_info info); 37 static napi_value IsIdeoGraphicAddon(napi_env env, napi_callback_info info); 38 static napi_value IsLetterAddon(napi_env env, napi_callback_info info); 39 static napi_value IsLowerCaseAddon(napi_env env, napi_callback_info info); 40 static napi_value IsUpperCaseAddon(napi_env env, napi_callback_info info); 41 static napi_value GetTypeAddon(napi_env env, napi_callback_info info); 42 43 static napi_value ObjectConstructor(napi_env env, napi_callback_info info); 44 }; 45 } // namespace I18n 46 } // namespace Global 47 } // namespace OHOS 48 #endif