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 #ifndef UPDATE_DEFINE_PROPERTY_H 17 #define UPDATE_DEFINE_PROPERTY_H 18 19 #include <string> 20 #include <vector> 21 22 #include "js_native_api.h" 23 #include "js_native_api_types.h" 24 25 namespace OHOS::UpdateEngine { 26 class DefineProperty { 27 public: 28 static void DefineProperties(napi_env env, napi_value exports); 29 30 private: 31 static void DefineCallResult(napi_env env, napi_value exports); 32 static void DefineUpgradeStatus(napi_env env, napi_value exports); 33 static void DefineComponentType(napi_env env, napi_value exports); 34 static void DefineEffectiveMode(napi_env env, napi_value exports); 35 static void DefineNetType(napi_env env, napi_value exports); 36 static void DefineOrder(napi_env env, napi_value exports); 37 static void DefineEventClassify(napi_env env, napi_value exports); 38 static void DefineBusinessSubType(napi_env env, napi_value exports); 39 static void DefineDescriptionType(napi_env env, napi_value exports); 40 static void DefineDescriptionFormat(napi_env env, napi_value exports); 41 static void DefineEventId(napi_env env, napi_value exports); 42 static void DefineUpgradeAction(napi_env env, napi_value exports); 43 static void DefineBusinessVendor(napi_env env, napi_value exports); 44 }; 45 } // namespace OHOS::UpdateEngine 46 #endif // UPDATE_DEFINE_PROPERTY_H