1e5d0e473Sopenharmony_ci/*
2e5d0e473Sopenharmony_ci * Copyright (C) 2022-2023 Huawei Device Co., Ltd.
3e5d0e473Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4e5d0e473Sopenharmony_ci * you may not use this file except in compliance with the License.
5e5d0e473Sopenharmony_ci * You may obtain a copy of the License at
6e5d0e473Sopenharmony_ci *
7e5d0e473Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8e5d0e473Sopenharmony_ci *
9e5d0e473Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10e5d0e473Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11e5d0e473Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e5d0e473Sopenharmony_ci * See the License for the specific language governing permissions and
13e5d0e473Sopenharmony_ci * limitations under the License.
14e5d0e473Sopenharmony_ci */
15e5d0e473Sopenharmony_ci
16e5d0e473Sopenharmony_ci#ifndef TELEPHONY_IMS_SMS_INTERFACE_H
17e5d0e473Sopenharmony_ci#define TELEPHONY_IMS_SMS_INTERFACE_H
18e5d0e473Sopenharmony_ci
19e5d0e473Sopenharmony_ci#include "iremote_broker.h"
20e5d0e473Sopenharmony_ci#include "ims_sms_callback_interface.h"
21e5d0e473Sopenharmony_ci#include "ims_sms_ipc_interface_code.h"
22e5d0e473Sopenharmony_ci
23e5d0e473Sopenharmony_cinamespace OHOS {
24e5d0e473Sopenharmony_cinamespace Telephony {
25e5d0e473Sopenharmony_ciclass ImsSmsInterface : public IRemoteBroker {
26e5d0e473Sopenharmony_cipublic:
27e5d0e473Sopenharmony_ci    /**
28e5d0e473Sopenharmony_ci     * @brief IMS send message interface.
29e5d0e473Sopenharmony_ci     *
30e5d0e473Sopenharmony_ci     * @param slotId Indicates the card slot index number,
31e5d0e473Sopenharmony_ci     * ranging from {@code 0} to the maximum card slot index number supported by the device.
32e5d0e473Sopenharmony_ci     * @param imsMessageInfo Indicates the information of IMS message.
33e5d0e473Sopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
34e5d0e473Sopenharmony_ci     */
35e5d0e473Sopenharmony_ci    virtual int32_t ImsSendMessage(int32_t slotId, const ImsMessageInfo &imsMessageInfo) = 0;
36e5d0e473Sopenharmony_ci
37e5d0e473Sopenharmony_ci    /**
38e5d0e473Sopenharmony_ci     * @brief IMS set ims sms config interface.
39e5d0e473Sopenharmony_ci     *
40e5d0e473Sopenharmony_ci     * @param slotId Indicates the card slot index number,
41e5d0e473Sopenharmony_ci     * ranging from {@code 0} to the maximum card slot index number supported by the device.
42e5d0e473Sopenharmony_ci     * @param imsSmsConfig 1:enable ims sms, 0:disable ims sms
43e5d0e473Sopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
44e5d0e473Sopenharmony_ci     */
45e5d0e473Sopenharmony_ci    virtual int32_t ImsSetSmsConfig(int32_t slotId, int32_t imsSmsConfig) = 0;
46e5d0e473Sopenharmony_ci
47e5d0e473Sopenharmony_ci    /**
48e5d0e473Sopenharmony_ci     * @brief IMS get sms config interface.
49e5d0e473Sopenharmony_ci     *
50e5d0e473Sopenharmony_ci     * @param slotId Indicates the card slot index number,
51e5d0e473Sopenharmony_ci     * ranging from {@code 0} to the maximum card slot index number supported by the device.
52e5d0e473Sopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
53e5d0e473Sopenharmony_ci     */
54e5d0e473Sopenharmony_ci    virtual int32_t ImsGetSmsConfig(int32_t slotId) = 0;
55e5d0e473Sopenharmony_ci
56e5d0e473Sopenharmony_ci    /**
57e5d0e473Sopenharmony_ci     * @brief Register CallBack to listen the response from ImsSms.
58e5d0e473Sopenharmony_ci     *
59e5d0e473Sopenharmony_ci     * @param sptr<ImsSmsCallbackInterface>
60e5d0e473Sopenharmony_ci     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
61e5d0e473Sopenharmony_ci     */
62e5d0e473Sopenharmony_ci    virtual int32_t RegisterImsSmsCallback(const sptr<ImsSmsCallbackInterface> &callback) = 0;
63e5d0e473Sopenharmony_ci
64e5d0e473Sopenharmony_cipublic:
65e5d0e473Sopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsSmsInterface");
66e5d0e473Sopenharmony_ci};
67e5d0e473Sopenharmony_ci} // namespace Telephony
68e5d0e473Sopenharmony_ci} // namespace OHOS
69e5d0e473Sopenharmony_ci
70e5d0e473Sopenharmony_ci#endif // TELEPHONY_IMS_SMS_INTERFACE_H
71