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 16var ExtensionContext = requireNapi("application.ExtensionContext") 17 18class WallpaperExtensionContext extends ExtensionContext { 19 constructor(obj) { 20 super(obj); 21 this.extensionAbilityInfo = obj.extensionAbilityInfo 22 } 23 24 startAbility(want, options, callback) { 25 console.log("startAbility"); 26 return this.__context_impl__.startAbility(want, options, callback); 27 } 28 29 connectAbility(want, options) { 30 console.log("connectAbility"); 31 return this.__context_impl__.connectAbility(want, options); 32 } 33 34 startAbilityWithAccount(want, accountId, options, callback) { 35 console.log("startAbilityWithAccount"); 36 return this.__context_impl__.startAbilityWithAccount(want, accountId, options, callback); 37 } 38 39 connectAbilityWithAccount(want, accountId, options) { 40 console.log("connectAbilityWithAccount"); 41 return this.__context_impl__.connectAbilityWithAccount(want, accountId, options); 42 } 43 44 disconnectAbility(connection, callback) { 45 console.log("disconnectAbility"); 46 return this.__context_impl__.disconnectAbility(connection, callback); 47 } 48 49 terminateSelf(callback) { 50 console.log("terminateSelf"); 51 return this.__context_impl__.terminateSelf(callback); 52 } 53} 54 55export default WallpaperExtensionContext