• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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 * @addtogroup Ril
18 * @{
19 *
20 * @brief Defines Ril-related APIs.
21 *
22 * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer
23 * telephony services, including call, SMS, MMS, network search, and SIM card services.
24 *
25 * @since 6.0
26 * @version 1.0
27 */
28
29/**
30 * @file IRil.idl
31 *
32 * @brief Declares the request API of the RIL module.
33 *
34 * @since 6.0
35 * @version 1.0
36 */
37
38/**
39 * @brief Defines the path for the package of the RIL module APIs.
40 *
41 * @since 6.0
42 * @version 1.0
43 */
44package ohos.hdi.ril.v1_5;
45
46import ohos.hdi.ril.v1_5.IRilCallback;
47import ohos.hdi.ril.v1_4.IRil;
48import ohos.hdi.ril.v1_5.Types;
49
50/**
51 * @brief Declares the request API of the RIL module.
52 *
53 * Request APIs are called to make calls, send SMS and MMS messages, activate SIM cards,
54 * and access the Internet.
55 *
56 * @since 6.0
57 * @version 1.0
58 */
59interface IRil extends ohos.hdi.ril.v1_4.IRil {
60    /**
61      * @brief Sets an IRil callback.
62      *
63      * @param rilCallback Callback to set. For details, see {@link IRilCallback}.
64      *
65      * @return Returns <b>0</b> if the operation is successful.
66      * @return Returns a non-0 value if the operation fails.
67      *
68      * @since 6.0
69      * @version 1.0
70      */
71    [oneway] SetCallback1_5([in] IRilCallback rilCallback);
72
73    /**
74    * @brief Get the data service main card slot.
75    *
76    * @param slotId Card slot ID.
77    * @param serialId Serial ID of a request.
78    *
79    * @return Returns <b>0</b> if the operation is successful.
80    * @return Returns a non-0 value if the operation fails.
81    *
82    * @since 6.0
83    * @version 1.0
84    */
85    [oneway] GetPrimarySlot([in] int slotId, [in] int serialId);
86
87    /**
88    * @brief Set the data service main card slot when the modem does not require a software power on/off.
89    *
90    * @param slotId Card slot ID.
91    * @param serialId Serial ID of a request.
92    *
93    * @return Returns <b>0</b> if the operation is successful.
94    * @return Returns a non-0 value if the operation fails.
95    *
96    * @since 6.0
97    * @version 1.0
98    */
99    [oneway] SetPrimarySlot([in] int slotId, [in] int serialId);
100}
101/** @} */