chenqiyang
2024-07-17 be56723cce4cd60ddc144ebe6ac20607675b3006
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
/*
 * Copyright (c) 2010-2019 Belledonne Communications SARL.
 *
 * This file is part of Liblinphone.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
 
#ifndef _L_C_CHAT_ROOM_CBS_H_
#define _L_C_CHAT_ROOM_CBS_H_
 
#include "linphone/api/c-callbacks.h"
#include "linphone/api/c-types.h"
 
// =============================================================================
 
#ifdef __cplusplus
    extern "C" {
#endif // ifdef __cplusplus
 
/**
 * @addtogroup chatroom
 * @{
 */
 
/**
 * Acquire a reference to the chat room callbacks object.
 * @param cbs The #LinphoneChatRoomCbs object @notnil
 * @return The same #LinphoneChatRoomCbs object @notnil
**/
LINPHONE_PUBLIC LinphoneChatRoomCbs * linphone_chat_room_cbs_ref (LinphoneChatRoomCbs *cbs);
 
/**
 * Release reference to the chat room callbacks object.
 * @param cbs The chat room callbacks object @notnil
**/
LINPHONE_PUBLIC void linphone_chat_room_cbs_unref (LinphoneChatRoomCbs *cbs);
 
/**
 * Retrieve the user pointer associated with the chat room callbacks object.
 * @param cbs The chat room callbacks object @notnil
 * @return The user pointer associated with the chat room callbacks object. @maybenil
**/
LINPHONE_PUBLIC void * linphone_chat_room_cbs_get_user_data (const LinphoneChatRoomCbs *cbs);
 
/**
 * Assign a user pointer to the chat room callbacks object.
 * @param cbs The chat room callbacks object @notnil
 * @param user_data The user pointer to associate with the chat room callbacks object. @maybenil
**/
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_user_data (LinphoneChatRoomCbs *cbs, void *user_data);
 
/**
 * Get the is-composing received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current is-composing received callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsIsComposingReceivedCb linphone_chat_room_cbs_get_is_composing_received (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the is-composing received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The is-composing received callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_is_composing_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsIsComposingReceivedCb cb);
 
/**
 * Get the message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current message received callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsMessageReceivedCb linphone_chat_room_cbs_get_message_received (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The message received callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsMessageReceivedCb cb);
 
/**
 * Get the new event log callback.
 * This callback will be called before every other #LinphoneEventLog related callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current event log created callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsNewEventCb linphone_chat_room_cbs_get_new_event (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the new event log callback.
 * This callback will be called before every other #LinphoneEventLog related callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The event log created callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_new_event (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsNewEventCb cb);
 
/**
 * Get the chat message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current chat message received callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsChatMessageReceivedCb linphone_chat_room_cbs_get_chat_message_received (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the chat message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The chat message received callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageReceivedCb cb);
 
/**
 * Get the chat message sending callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current chat message being sent callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsChatMessageSendingCb linphone_chat_room_cbs_get_chat_message_sending (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the chat message sending callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The chat message being sent callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_sending (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageSendingCb cb);
 
/**
 * Get the chat message sent callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current chat message sent callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsChatMessageSentCb linphone_chat_room_cbs_get_chat_message_sent (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the chat message sent callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The chat message sent callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_sent (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageSentCb cb);
 
/**
 * Get the participant added callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current participant added callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAddedCb linphone_chat_room_cbs_get_participant_added (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant added callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The participant added callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAddedCb cb);
 
/**
 * Get the participant removed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current participant removed callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantRemovedCb linphone_chat_room_cbs_get_participant_removed (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant removed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The participant removed callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRemovedCb cb);
 
/**
 * Get the participant admin status changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current participant admin status changed callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAdminStatusChangedCb linphone_chat_room_cbs_get_participant_admin_status_changed (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant admin status changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The participant admin status changed callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_admin_status_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb);
 
/**
 * Get the state changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current state changed callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsStateChangedCb linphone_chat_room_cbs_get_state_changed (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the state changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The state changed callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_state_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsStateChangedCb cb);
 
/**
 * Get the security event callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The security event callback to be used.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsSecurityEventCb linphone_chat_room_cbs_get_security_event (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the security event callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The security event callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_security_event (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsSecurityEventCb cb);
 
/**
 * Get the subject changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current subject changed callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsSubjectChangedCb linphone_chat_room_cbs_get_subject_changed (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the subject changed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The subject changed callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_subject_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsSubjectChangedCb cb);
 
/**
 * Get the undecryptable message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current undecryptable message received callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsUndecryptableMessageReceivedCb linphone_chat_room_cbs_get_undecryptable_message_received (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the undecryptable message received callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The undecryptable message received callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_undecryptable_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsUndecryptableMessageReceivedCb cb);
 
/**
 * Get the participant device added callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current participant device added callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantDeviceAddedCb linphone_chat_room_cbs_get_participant_device_added (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant device added callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The participant device added callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_device_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantDeviceAddedCb cb);
 
/**
 * Get the participant device removed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The current participant device removed callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantDeviceRemovedCb linphone_chat_room_cbs_get_participant_device_removed (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant device removed callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The participant device removed callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_device_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantDeviceRemovedCb cb);
 
/**
 * Get the conference joined callback.
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @return The current conference joined callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsConferenceJoinedCb linphone_chat_room_cbs_get_conference_joined (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the conference joined callback.
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @param cb The conference joined callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_conference_joined (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsConferenceJoinedCb cb);
 
/**
 * Get the conference left callback.
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @return The current conference left callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsConferenceLeftCb linphone_chat_room_cbs_get_conference_left (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the conference left callback.
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @param cb The conference left callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_conference_left (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsConferenceLeftCb cb);
 
/**
 * Get the ephemeral event callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @return The ephemeral event callback to be used.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralEventCb linphone_chat_room_cbs_get_ephemeral_event (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the ephemeral event callback.
 * @param cbs #LinphoneChatRoomCbs object. @notnil
 * @param cb The ephemeral event callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_event (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralEventCb cb);
 
/**
 * Get the current "ephemeral message timer started" callback. This callback is called when a message deletion timer starts (the message has been viewed).
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @return The current ephemeral message "timer started" callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralMessageTimerStartedCb linphone_chat_room_cbs_get_ephemeral_message_timer_started (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the ephemeral message timer started callback. This callback will be used when new message deletion timer starts (the message has been viewed).
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @param cb The ephemeral message timer started callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_message_timer_started (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralMessageTimerStartedCb cb);
 
/**
 * Get the ephemeral message deleted callback. This callback is used when a message deletion timer runs out (message is deleted).
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @return The current ephemeral message deleted callback.
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsEphemeralMessageDeletedCb linphone_chat_room_cbs_get_ephemeral_message_deleted (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the ephemeral message deleted callback. This callback is used when new message deletion timer runs out (message is deleted).
 * @param cbs LinphoneChatRoomCbs object. @notnil
 * @param cb The ephemeral message deleted callback to be used.
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_ephemeral_message_deleted (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsEphemeralMessageDeletedCb cb);
 
/**
 * Get the conference address generation callback.
 * @param cbs #LinphoneChatRoomCbs object @notnil
 * @return The current conference address generation callback
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsConferenceAddressGenerationCb linphone_chat_room_cbs_get_conference_address_generation (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the conference address generation callback.
 * @param cbs #LinphoneChatRoomCbs object @notnil
 * @param cb The conference address generation callback to be used
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_conference_address_generation (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsConferenceAddressGenerationCb cb);
 
/**
 * Get the participant registration subscription callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @return The participant registration subscription callback
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantRegistrationSubscriptionRequestedCb linphone_chat_room_cbs_get_participant_registration_subscription_requested (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant registration subscription callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @param cb The participant registration subscription callback to be used
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_registration_subscription_requested (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRegistrationSubscriptionRequestedCb cb);
 
/**
 * Get the participant registration unsubscription callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @return The participant registration unsubscription callback
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantRegistrationUnsubscriptionRequestedCb linphone_chat_room_cbs_get_participant_registration_unsubscription_requested (const LinphoneChatRoomCbs *cbs);
 
/**
 * Set the participant registration unsubscription callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @param cb The participant registration unsubscription callback to be used
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_registration_unsubscription_requested (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRegistrationUnsubscriptionRequestedCb cb);
 
/**
 * Get the message should be stored callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @return The message should be stored callback
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsShouldChatMessageBeStoredCb linphone_chat_room_cbs_get_chat_message_should_be_stored (LinphoneChatRoomCbs *cbs);
 
/**
 * Set the message should be stored callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @param cb The message should be stored callback to be used
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_should_be_stored (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsShouldChatMessageBeStoredCb cb);
 
/**
 * Get the message's participant state changed callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @return The message's participant state changed callback callback
 */
LINPHONE_PUBLIC LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb linphone_chat_room_cbs_get_chat_message_participant_imdn_state_changed (LinphoneChatRoomCbs *cbs);
 
/**
 * Set the message's participant state changed callback callback.
 * @param cbs LinphoneChatRoomCbs object @notnil
 * @param cb The message's participant state changed callback to be used
 */
LINPHONE_PUBLIC void linphone_chat_room_cbs_set_chat_message_participant_imdn_state_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsChatMessageParticipantImdnStateChangedCb cb);
 
/**
 * @}
 */
 
#ifdef __cplusplus
    }
#endif // ifdef __cplusplus
 
#endif // ifndef _L_C_CHAT_ROOM_CBS_H_