• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 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/**
17 * @file Defines the auto ad component
18 * @kit AdsKit
19 */
20
21import advertising from './@ohos.advertising';
22
23/**
24 * Defines the auto ad component.
25 * @syscap SystemCapability.Advertising.Ads
26 * @since 11
27 */
28/**
29 * Defines the auto ad component.
30 * @syscap SystemCapability.Advertising.Ads
31 * @atomicservice
32 * @since 12
33 */
34@Component
35declare struct AutoAdComponent {
36    /**
37     * The parameters in the request for loading ads.
38     * @type { AdRequestParams }
39     * @syscap SystemCapability.Advertising.Ads
40     * @since 11
41     */
42    /**
43     * The parameters in the request for loading ads.
44     * @type { AdRequestParams }
45     * @syscap SystemCapability.Advertising.Ads
46     * @atomicservice
47     * @since 12
48     */
49    adParam: advertising.AdRequestParams;
50
51    /**
52     * The ad options of loading ads.
53     * @type { AdOptions }
54     * @syscap SystemCapability.Advertising.Ads
55     * @since 11
56     */
57    /**
58     * The ad options of loading ads.
59     * @type { AdOptions }
60     * @syscap SystemCapability.Advertising.Ads
61     * @atomicservice
62     * @since 12
63     */
64    adOptions: advertising.AdOptions;
65
66    /**
67     * The interaction options info for displaying ads.
68     * @type { AdDisplayOptions }
69     * @syscap SystemCapability.Advertising.Ads
70     * @since 11
71     */
72    /**
73     * The interaction options info for displaying ads.
74     * @type { AdDisplayOptions }
75     * @syscap SystemCapability.Advertising.Ads
76     * @atomicservice
77     * @since 12
78     */
79    displayOptions: advertising.AdDisplayOptions;
80
81    /**
82     * The interaction listener to be registered that use to show ads.
83     * @type { AdInteractionListener }
84     * @syscap SystemCapability.Advertising.Ads
85     * @since 11
86     */
87    /**
88     * The interaction listener to be registered that use to show ads.
89     * @type { AdInteractionListener }
90     * @syscap SystemCapability.Advertising.Ads
91     * @atomicservice
92     * @since 12
93     */
94    interactionListener: advertising.AdInteractionListener;
95
96    /**
97     * The method to build auto ad component.
98     * @syscap SystemCapability.Advertising.Ads
99     * @since 11
100     */
101    /**
102     * The method to build auto ad component.
103     * @syscap SystemCapability.Advertising.Ads
104     * @atomicservice
105     * @since 12
106     */
107    build(): void;
108}
109
110export { AutoAdComponent };
111