1 /* 2 im_notif_policy.h 3 Copyright (C) 2010-2016 Belledonne Communications SARL 4 5 This program is free software; you can redistribute it and/or 6 modify it under the terms of the GNU General Public License 7 as published by the Free Software Foundation; either version 2 8 of the License, or (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef LINPHONE_IM_NOTIF_POLICY_H_ 21 #define LINPHONE_IM_NOTIF_POLICY_H_ 22 23 24 #include "linphone/types.h" 25 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 32 /** 33 * @addtogroup chatroom 34 * @{ 35 */ 36 37 /** 38 * Acquire a reference to the LinphoneImNotifPolicy object. 39 * @param[in] policy LinphoneImNotifPolicy object. 40 * @return The same LinphoneImNotifPolicy object. 41 **/ 42 LINPHONE_PUBLIC LinphoneImNotifPolicy * linphone_im_notif_policy_ref(LinphoneImNotifPolicy *policy); 43 44 /** 45 * Release reference to the LinphoneImNotifPolicy object. 46 * @param[in] policy LinphoneImNotifPolicy object. 47 **/ 48 LINPHONE_PUBLIC void linphone_im_notif_policy_unref(LinphoneImNotifPolicy *policy); 49 50 /** 51 * Retrieve the user pointer associated with the LinphoneImNotifPolicy object. 52 * @param[in] policy LinphoneImNotifPolicy object. 53 * @return The user pointer associated with the LinphoneImNotifPolicy object. 54 **/ 55 LINPHONE_PUBLIC void *linphone_im_notif_policy_get_user_data(const LinphoneImNotifPolicy *policy); 56 57 /** 58 * Assign a user pointer to the LinphoneImNotifPolicy object. 59 * @param[in] policy LinphoneImNotifPolicy object. 60 * @param[in] ud The user pointer to associate with the LinphoneImNotifPolicy object. 61 **/ 62 LINPHONE_PUBLIC void linphone_im_notif_policy_set_user_data(LinphoneImNotifPolicy *policy, void *ud); 63 64 /** 65 * Clear an IM notif policy (deactivate all receiving and sending of notifications). 66 * @param[in] policy LinphoneImNotifPolicy object. 67 */ 68 LINPHONE_PUBLIC void linphone_im_notif_policy_clear(LinphoneImNotifPolicy *policy); 69 70 /** 71 * Enable all receiving and sending of notifications. 72 * @param[in] policy LinphoneImNotifPolicy object. 73 */ 74 LINPHONE_PUBLIC void linphone_im_notif_policy_enable_all(LinphoneImNotifPolicy *policy); 75 76 /** 77 * Tell whether is_composing notifications are being sent. 78 * @param[in] policy LinphoneImNotifPolicy object 79 * @return Boolean value telling whether is_composing notifications are being sent. 80 */ 81 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_send_is_composing(const LinphoneImNotifPolicy *policy); 82 83 /** 84 * Enable is_composing notifications sending. 85 * @param[in] policy LinphoneImNotifPolicy object 86 * @param[in] enable Boolean value telling whether to send is_composing notifications. 87 */ 88 LINPHONE_PUBLIC void linphone_im_notif_policy_set_send_is_composing(LinphoneImNotifPolicy *policy, bool_t enable); 89 90 /** 91 * Tell whether is_composing notifications are being notified when received. 92 * @param[in] policy LinphoneImNotifPolicy object 93 * @return Boolean value telling whether is_composing notifications are being notified when received. 94 */ 95 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_recv_is_composing(const LinphoneImNotifPolicy *policy); 96 97 /** 98 * Enable is_composing notifications receiving. 99 * @param[in] policy LinphoneImNotifPolicy object 100 * @param[in] enable Boolean value telling whether to notify received is_composing notifications. 101 */ 102 LINPHONE_PUBLIC void linphone_im_notif_policy_set_recv_is_composing(LinphoneImNotifPolicy *policy, bool_t enable); 103 104 /** 105 * Tell whether imdn delivered notifications are being sent. 106 * @param[in] policy LinphoneImNotifPolicy object 107 * @return Boolean value telling whether imdn delivered notifications are being sent. 108 */ 109 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_send_imdn_delivered(const LinphoneImNotifPolicy *policy); 110 111 /** 112 * Enable imdn delivered notifications sending. 113 * @param[in] policy LinphoneImNotifPolicy object 114 * @param[in] enable Boolean value telling whether to send imdn delivered notifications. 115 */ 116 LINPHONE_PUBLIC void linphone_im_notif_policy_set_send_imdn_delivered(LinphoneImNotifPolicy *policy, bool_t enable); 117 118 /** 119 * Tell whether imdn delivered notifications are being notified when received. 120 * @param[in] policy LinphoneImNotifPolicy object 121 * @return Boolean value telling whether imdn delivered notifications are being notified when received. 122 */ 123 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_recv_imdn_delivered(const LinphoneImNotifPolicy *policy); 124 125 /** 126 * Enable imdn delivered notifications receiving. 127 * @param[in] policy LinphoneImNotifPolicy object 128 * @param[in] enable Boolean value telling whether to notify received imdn delivered notifications. 129 */ 130 LINPHONE_PUBLIC void linphone_im_notif_policy_set_recv_imdn_delivered(LinphoneImNotifPolicy *policy, bool_t enable); 131 132 /** 133 * Tell whether imdn displayed notifications are being sent. 134 * @param[in] policy LinphoneImNotifPolicy object 135 * @return Boolean value telling whether imdn displayed notifications are being sent. 136 */ 137 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_send_imdn_displayed(const LinphoneImNotifPolicy *policy); 138 139 /** 140 * Enable imdn displayed notifications sending. 141 * @param[in] policy LinphoneImNotifPolicy object 142 * @param[in] enable Boolean value telling whether to send imdn displayed notifications. 143 */ 144 LINPHONE_PUBLIC void linphone_im_notif_policy_set_send_imdn_displayed(LinphoneImNotifPolicy *policy, bool_t enable); 145 146 /** 147 * Tell whether imdn displayed notifications are being notified when received. 148 * @param[in] policy LinphoneImNotifPolicy object 149 * @return Boolean value telling whether imdn displayed notifications are being notified when received. 150 */ 151 LINPHONE_PUBLIC bool_t linphone_im_notif_policy_get_recv_imdn_displayed(const LinphoneImNotifPolicy *policy); 152 153 /** 154 * Enable imdn displayed notifications receiving. 155 * @param[in] policy LinphoneImNotifPolicy object 156 * @param[in] enable Boolean value telling whether to notify received imdn displayed notifications. 157 */ 158 LINPHONE_PUBLIC void linphone_im_notif_policy_set_recv_imdn_displayed(LinphoneImNotifPolicy *policy, bool_t enable); 159 160 /** 161 * @} 162 */ 163 164 165 #ifdef __cplusplus 166 } 167 #endif 168 169 #endif /* LINPHONE_IM_NOTIF_POLICY_H_ */ 170