• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022-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 #ifndef TELEPHONY_IMS_SMS_CALLBACK_INTERFACE_H
17 #define TELEPHONY_IMS_SMS_CALLBACK_INTERFACE_H
18 
19 #include "iremote_broker.h"
20 
21 #include "ims_sms_types.h"
22 #include "hril_types.h"
23 
24 namespace OHOS {
25 namespace Telephony {
26 class ImsSmsCallbackInterface : public IRemoteBroker {
27 public:
28     virtual ~ImsSmsCallbackInterface() = default;
29 
30     /**
31      * @brief ImsSendMessageResponse the result of send the sms by IMS.
32      *
33      * @param slotId Indicates the card slot index number,
34      * ranging from {@code 0} to the maximum card slot index number supported by the device.
35      * @param result Indicates the result of send action.
36      * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure.
37      */
38     virtual int32_t ImsSendMessageResponse(int32_t slotId, const SendSmsResultInfo &result) = 0;
39 
40     /**
41      * @brief ImsSendMessageResponse the fail result of send the sms by IMS.
42      *
43      * @param slotId Indicates the card slot index number,
44      * ranging from {@code 0} to the maximum card slot index number supported by the device.
45      * @param info Indicates details of failure.
46      * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure.
47      */
48     virtual int32_t ImsSendMessageResponse(int32_t slotId, const HRilRadioResponseInfo &info) = 0;
49 
50     /**
51      * @brief ImsSetSmsConfigResponse the result for enable or disable IMS SMS.
52      *
53      * @param slotId Indicates the card slot index number,
54      * ranging from {@code 0} to the maximum card slot index number supported by the device.
55      * @param info Indicates set action was success or failure.
56      * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure.
57      */
58     virtual int32_t ImsSetSmsConfigResponse(int32_t slotId, const HRilRadioResponseInfo &info) = 0;
59 
60     /**
61      * @brief ImsGetSmsConfigResponse the result for get IMS SMS config.
62      *
63      * @param slotId Indicates the card slot index number,
64      * ranging from {@code 0} to the maximum card slot index number supported by the device.
65      * @param imsSmsConfig Indicates Ims sms was enabled or disabled.
66      * ranging {@code 0} Ims sms was disabled {@code 1} Ims sms was enabled.
67      * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure.
68      */
69     virtual int32_t ImsGetSmsConfigResponse(int32_t slotId, int32_t imsSmsConfig) = 0;
70 
71     /**
72      * @brief ImsGetSmsConfigResponse the fail result for get IMS SMS config.
73      *
74      * @param slotId Indicates the card slot index number,
75      * ranging from {@code 0} to the maximum card slot index number supported by the device.
76      * @param info Indicates details of failure.
77      * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure.
78      */
79     virtual int32_t ImsGetSmsConfigResponse(int32_t slotId, const HRilRadioResponseInfo &info) = 0;
80 
81 public:
82     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsSmsCallback");
83 };
84 } // namespace Telephony
85 } // namespace OHOS
86 
87 #endif // TELEPHONY_IMS_SMS_CALLBACK_INTERFACE_H
88