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