vivox-sdk-node 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2608 @@
1
+ /* Copyright (c) 2019 Unity Technologies.
2
+ *
3
+ * This software is subject to, and made available under, the Unity Terms of Service (see Unity Terms of Service).
4
+ * Your use of this software constitutes your acceptance of such terms.
5
+
6
+ * Unless expressly provided otherwise, the software under this license is made available strictly on an "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
7
+ * Please review the Terms of Service for details on these and other terms and conditions.”
8
+ */
9
+ #pragma once
10
+
11
+ #include <Vxc.h>
12
+
13
+ #pragma pack(push)
14
+ #pragma pack(8)
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ /**
21
+ * Sent whenever the login state of the particular account has transitioned from one value to another.
22
+ * \ingroup login
23
+ */
24
+ typedef struct vx_evt_account_login_state_change {
25
+ /**
26
+ * The common properties for all events.
27
+ */
28
+ vx_evt_base_t base;
29
+
30
+ /**
31
+ * The new state of the entity.
32
+ * For specific state codes, refer to the codes at the end of this document.
33
+ */
34
+ vx_login_state_change_state state;
35
+
36
+ /**
37
+ * The handle returned from a successful account request.
38
+ */
39
+ VX_HANDLE account_handle;
40
+
41
+ /**
42
+ * The code used to identify why a state change has been made.
43
+ */
44
+ int status_code;
45
+
46
+ /**
47
+ * Text (in English) used to describe the status code.
48
+ */
49
+ char *status_string;
50
+
51
+ /**
52
+ * The originating login request cookie.
53
+ * This is here because the login_state_logging_in state change event comes before the response with the handle.
54
+ */
55
+ VX_COOKIE cookie;
56
+
57
+ /**
58
+ * The originating login request cookie (non-marshallable).
59
+ * This is here because the login_state_logging_in state change event comes before the response with the handle.
60
+ */
61
+ void *vcookie;
62
+ } vx_evt_account_login_state_change_t;
63
+
64
+ /**
65
+ * Presented when a buddy has issued presence information.
66
+ * \ingroup buddy
67
+ */
68
+ typedef struct vx_evt_buddy_presence {
69
+ /**
70
+ * The common properties for all events.
71
+ */
72
+ vx_evt_base_t base;
73
+
74
+ /**
75
+ * \deprecated This is deprecated and should not be used.
76
+ * @deprecated
77
+ */
78
+ vx_buddy_presence_state state;
79
+
80
+ /**
81
+ * The handle returned from a successful login request.
82
+ */
83
+ VX_HANDLE account_handle;
84
+
85
+ /**
86
+ * The URI of the sender of the message.
87
+ */
88
+ char *buddy_uri;
89
+
90
+ /**
91
+ * The new presence of the buddy.
92
+ * Refer to the codes in table \ref vx_buddy_presence_state
93
+ */
94
+ vx_buddy_presence_state presence;
95
+
96
+ /**
97
+ * A custom message string when presence is set to "custom".
98
+ */
99
+ char *custom_message;
100
+
101
+ /**
102
+ * The displayname if the buddy_uri had a displayname.
103
+ */
104
+ char *displayname;
105
+
106
+ /**
107
+ * The application of the buddy whose presence is being reported.
108
+ * This can be NULL or empty.
109
+ */
110
+ char *application;
111
+
112
+ /**
113
+ * The contact address (URI) of the buddy whose presence is being reported.
114
+ * This can be NULL or empty.
115
+ */
116
+ char *contact;
117
+
118
+ /**
119
+ * RESERVED FOR FUTURE USE
120
+ * The priority of the buddy whose presence is being reported.
121
+ * This can be NULL or empty.
122
+ */
123
+ char *priority;
124
+
125
+ /**
126
+ * The unique ID of the instance of the buddy whose presence is being reported.
127
+ * This can be NULL or empty.
128
+ */
129
+ char *id;
130
+
131
+ /**
132
+ * The unique ID of the instance of the buddy whose presence is being reported.
133
+ * This is used to distinguish between the same buddy when they are logged in on different devices.
134
+ * This can be NULL or empty.
135
+ * \note V5 only. In V4, this is always NULL.
136
+ */
137
+ char *encoded_uri_with_tag;
138
+ } vx_evt_buddy_presence_t;
139
+
140
+ /**
141
+ * Generated when a buddy wants to request presence visibility.
142
+ * This event is not presented if an auto-accept or auto-block rule matches the requesting buddy_uri.
143
+ * Typically, the application uses this event to prompt a user to explicitly accept or deny the request for presence.
144
+ * Optionally, the application might create and store an auto-accept or auto-block rule based on the user's selection.
145
+ * The application should generate a vx_req_account_send_subscription_reply_t request based on application logic and/or end-user response.
146
+ * The subscription_handle value must be extracted and returned as a parameter to vx_req_account_send_subscription_reply_t.
147
+ * \see vx_req_account_buddy_set
148
+ * \ingroup buddy
149
+ */
150
+ typedef struct vx_evt_subscription {
151
+ /**
152
+ * The common properties for all events.
153
+ */
154
+ vx_evt_base_t base;
155
+
156
+ /**
157
+ * The handle returned from a successful login request.
158
+ */
159
+ VX_HANDLE account_handle;
160
+
161
+ /**
162
+ * The URI of the buddy whose presence is being sent.
163
+ */
164
+ char *buddy_uri;
165
+
166
+ /**
167
+ * The identifier of the subscription event.
168
+ * Used when forming a reply with vx_req_account_send_subscription_reply_t.
169
+ */
170
+ char *subscription_handle;
171
+
172
+ /**
173
+ * subscription_presence is currently the only supported value.
174
+ */
175
+ vx_subscription_type subscription_type;
176
+
177
+ /**
178
+ * The displayname, if the buddy_uri had a displayname.
179
+ */
180
+ char *displayname;
181
+
182
+ /**
183
+ * The application of the buddy whose subscription is being reported.
184
+ * This can be NULL or empty.
185
+ */
186
+ char *application;
187
+
188
+ /**
189
+ * NOT CURRENTLY IMPLEMENTED
190
+ * An optional message supplied by the initiating user on vx_req_account_buddy_set_t.
191
+ */
192
+ char *message;
193
+ } vx_evt_subscription_t;
194
+
195
+ /**
196
+ * Received when another user has started or stopped typing, or has raised or lowered their hand,
197
+ * within the context of a session.
198
+ * \ingroup session
199
+ */
200
+ typedef struct vx_evt_session_notification {
201
+ /**
202
+ * The common properties for all events.
203
+ */
204
+ vx_evt_base_t base;
205
+
206
+ /**
207
+ * \deprecated This is deprecated and should not be used.
208
+ * @deprecated
209
+ */
210
+ vx_session_notification_state state;
211
+
212
+ /**
213
+ * The handle of the session to which this event applies.
214
+ */
215
+ VX_HANDLE session_handle;
216
+
217
+ /**
218
+ * The URI of the buddy whose presence is being sent.
219
+ */
220
+ char *participant_uri;
221
+
222
+ /**
223
+ * The new notification type from the buddy.
224
+ * Refer to the codes in table \ref vx_notification_type
225
+ */
226
+ vx_notification_type notification_type;
227
+
228
+ /**
229
+ * The encoded URI for the user with the tag.
230
+ * This uniquely identifies users that might appear multiple times in a channel.
231
+ */
232
+ char *encoded_uri_with_tag;
233
+
234
+ /**
235
+ * Indicates whether the message is from the current logged in user.
236
+ */
237
+ int is_current_user;
238
+ } vx_evt_session_notification_t;
239
+
240
+ /**
241
+ * Presented when an incoming message has arrived from a participant in an open session with text enabled.
242
+ * \ingroup session
243
+ */
244
+ typedef struct vx_evt_message {
245
+ /**
246
+ * The common properties for all events.
247
+ */
248
+ vx_evt_base_t base;
249
+
250
+ /**
251
+ * \deprecated This is deprecated and should not be used.
252
+ * @deprecated
253
+ */
254
+ vx_message_state state;
255
+
256
+ /**
257
+ * The handle returned from a successful session group create request.
258
+ * \see vx_req_sessiongroup_create
259
+ */
260
+ VX_HANDLE sessiongroup_handle;
261
+
262
+ /**
263
+ * The handle returned from a successful session add request.
264
+ * \see vx_req_sessiongroup_add_session
265
+ */
266
+ VX_HANDLE session_handle;
267
+
268
+ /**
269
+ * The URI of the sender of the message.
270
+ */
271
+ char *participant_uri;
272
+
273
+ /**
274
+ * The content type of the message.
275
+ */
276
+ char *message_header;
277
+
278
+ /**
279
+ * The contents of the message.
280
+ */
281
+ char *message_body;
282
+
283
+ /**
284
+ * The id of the message. It is empty unless chat history is enabled.
285
+ */
286
+ char *message_id;
287
+
288
+ /**
289
+ * The displayname, if the participant_uri had a displayname.
290
+ */
291
+ char *participant_displayname;
292
+
293
+ /**
294
+ * The application of the entity who is sending the message.
295
+ * This can be NULL or empty.
296
+ */
297
+ char *application;
298
+
299
+ /**
300
+ * The identity that the original sender wanted to present.
301
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the original sender.
302
+ */
303
+ char *alias_username;
304
+
305
+ /**
306
+ * The encoded URI for the user with the tag.
307
+ * This uniquely identifies users that might appear multiple times in a channel.
308
+ */
309
+ char *encoded_uri_with_tag;
310
+
311
+ /**
312
+ * Indicates whether the message is from the current logged in user.
313
+ */
314
+ int is_current_user;
315
+
316
+ /**
317
+ * The language (default NULL, implies "en").
318
+ * \note V5 only. In V4, this is always NULL.
319
+ */
320
+ char *language;
321
+
322
+ /**
323
+ * The namespace of the custom application stanza (optional, default NULL).
324
+ * \note V5 only. In V4, this is always NULL.
325
+ */
326
+ char *application_stanza_namespace;
327
+
328
+ /**
329
+ * The custom application stanza body (optional, default NULL).
330
+ * \note V5 only. In V4, this is always NULL.
331
+ */
332
+ char *application_stanza_body;
333
+ } vx_evt_message_t;
334
+
335
+ /**
336
+ * Presented when an incoming message has arrived from a participant in an open session with message-deleted.
337
+ * \ingroup session
338
+ */
339
+ typedef struct vx_evt_session_delete_message {
340
+ /**
341
+ * The common properties for all events.
342
+ */
343
+ vx_evt_base_t base;
344
+
345
+ /**
346
+ * The handle used in vx_req_sessiongroup_addsession.
347
+ * \see vx_req_sessiongroup_addsession
348
+ */
349
+ VX_HANDLE sessiongroup_handle;
350
+
351
+ /**
352
+ * The handle returned from a successful session request.
353
+ */
354
+ VX_HANDLE session_handle;
355
+
356
+ /**
357
+ * The message_id of the message to be editted.
358
+ */
359
+ char *message_id;
360
+
361
+ /**
362
+ * The timestamp of the deleted event.
363
+ */
364
+ long long delete_time;
365
+
366
+ /**
367
+ * The sender URI.
368
+ */
369
+ char *from_uri;
370
+ } vx_evt_session_delete_message_t;
371
+
372
+ /**
373
+ * Presented when an incoming message has arrived from a participant in an open session with message-edited.
374
+ * \ingroup session
375
+ */
376
+ typedef struct vx_evt_session_edit_message {
377
+ /**
378
+ * The common properties for all events.
379
+ */
380
+ vx_evt_base_t base;
381
+
382
+ /**
383
+ * The handle used in vx_req_sessiongroup_addsession.
384
+ * \see vx_req_sessiongroup_addsession
385
+ */
386
+ VX_HANDLE sessiongroup_handle;
387
+
388
+ /**
389
+ * The handle returned from a successful session request.
390
+ */
391
+ VX_HANDLE session_handle;
392
+
393
+ /**
394
+ * The message_id of the message to be editted.
395
+ */
396
+ char *message_id;
397
+
398
+ /**
399
+ * The new edited message event.
400
+ */
401
+ char *new_message;
402
+
403
+ /**
404
+ * The timestamp of the edited event.
405
+ */
406
+ long long edit_time;
407
+
408
+ /**
409
+ * The displayname of the sender if available
410
+ */
411
+ char *displayname;
412
+
413
+ /**
414
+ * The sender URI.
415
+ */
416
+ char *from_uri;
417
+
418
+ /**
419
+ * The language.
420
+ * The default setting is NULL, which implies "en".
421
+ */
422
+ char *language;
423
+ } vx_evt_session_edit_message_t;
424
+
425
+ /**
426
+ * Presented when an incoming message has arrived from a participant with message-deleted.
427
+ * \ingroup session
428
+ */
429
+ typedef struct vx_evt_account_delete_message {
430
+ /**
431
+ * The common properties for all events.
432
+ */
433
+ vx_evt_base_t base;
434
+
435
+ /**
436
+ * The handle returned from a successful account request.
437
+ */
438
+ VX_HANDLE account_handle;
439
+
440
+ /**
441
+ * The message_id of the message to be deleted.
442
+ */
443
+ char *message_id;
444
+
445
+ /**
446
+ * The timestamp of the deleted event.
447
+ */
448
+ long long delete_time;
449
+
450
+ /**
451
+ * The sender URI.
452
+ */
453
+ char *from_user;
454
+ } vx_evt_account_delete_message_t;
455
+
456
+ /**
457
+ * Presented when an incoming message has arrived from a participant with message-edited.
458
+ * \ingroup session
459
+ */
460
+ typedef struct vx_evt_account_edit_message {
461
+ /**
462
+ * The common properties for all events.
463
+ */
464
+ vx_evt_base_t base;
465
+
466
+ /**
467
+ * The handle returned from a successful account request.
468
+ */
469
+ VX_HANDLE account_handle;
470
+
471
+ /**
472
+ * The message_id of the message to be editted.
473
+ */
474
+ char *message_id;
475
+
476
+ /**
477
+ * The new edited message event.
478
+ */
479
+ char *new_message;
480
+
481
+ /**
482
+ * The timestamp of the editted event.
483
+ */
484
+ long long edit_time;
485
+
486
+ /**
487
+ * The displayname of the sender if available
488
+ */
489
+ char *displayname;
490
+
491
+ /**
492
+ * The sender URI.
493
+ */
494
+ char *from_user;
495
+
496
+ /**
497
+ * The language.
498
+ * The default setting is NULL, which implies "en".
499
+ */
500
+ char *language;
501
+ } vx_evt_account_edit_message_t;
502
+
503
+ #ifndef DOXYGEN_MAM_SKIP
504
+ /**
505
+ * Presented when a message is found in response to a %vx_req_session_archive_query or %vx_req_session_chat_history_query request.
506
+ * This event is triggered for every message that is found.
507
+ * \ingroup session
508
+ */
509
+ typedef struct vx_evt_session_archive_message {
510
+ /**
511
+ * The common properties for all events.
512
+ */
513
+ vx_evt_base_t base;
514
+
515
+ /**
516
+ * The handle used in vx_req_sessiongroup_addsession.
517
+ * \see vx_req_sessiongroup_addsession
518
+ */
519
+ VX_HANDLE sessiongroup_handle;
520
+
521
+ /**
522
+ * The handle returned from a successful session add request.
523
+ * \see vx_req_sessiongroup_add_session
524
+ */
525
+ VX_HANDLE session_handle;
526
+
527
+ /**
528
+ * The ID of the query in progress.
529
+ * This ID is returned for a successfully started query in a vx_resp_session_archive_query or vx_resp_session_chat_history_query response.
530
+ */
531
+ char *query_id;
532
+
533
+ /**
534
+ * The time stamp of the message in the format specified in XEP-0082.
535
+ */
536
+ char *time_stamp;
537
+
538
+ /**
539
+ * The URI of the sender of this message.
540
+ */
541
+ char *participant_uri;
542
+
543
+ /**
544
+ * The displayname, if the participant_uri had a displayname.
545
+ */
546
+ char *displayname;
547
+
548
+ /**
549
+ * The content of the message, UTF-8 encoded.
550
+ */
551
+ char *message_body;
552
+
553
+ /**
554
+ * The server-assigned ID of the message used for paging through large result sets.
555
+ */
556
+ char *message_id;
557
+
558
+ /**
559
+ * The encoded URI for the sending user with the tag.
560
+ * This uniquely identifies users that might be logged in with the same account name from multiple devices (Multi-Login).
561
+ * \note These users can be joined to a channel from only one device at any given moment of time (no Multi-Join).
562
+ */
563
+ char *encoded_uri_with_tag;
564
+
565
+ /**
566
+ * Indicates whether the message is from the current logged in user.
567
+ */
568
+ int is_current_user;
569
+
570
+ /**
571
+ * The language (default NULL, implies "en").
572
+ */
573
+ char *language;
574
+ } vx_evt_session_archive_message_t;
575
+ #endif
576
+ /**
577
+ * Presented when an incoming transcribed text has arrived from a participant in an open session.
578
+ * \ingroup session
579
+ */
580
+ typedef struct vx_evt_transcribed_message {
581
+ /**
582
+ * The common properties for all events.
583
+ */
584
+ vx_evt_base_t base;
585
+ /**
586
+ * The handle used in vx_req_sessiongroup_addsession.
587
+ * \see vx_req_sessiongroup_addsession
588
+ */
589
+ VX_HANDLE sessiongroup_handle;
590
+ /**
591
+ * The handle returned from successful session add request.
592
+ * \see vx_req_sessiongroup_add_session
593
+ */
594
+ VX_HANDLE session_handle;
595
+ /**
596
+ * The URI of the speaker.
597
+ */
598
+ char *participant_uri;
599
+ /**
600
+ * The transcribed text, UTF-8 encoded.
601
+ */
602
+ char *text;
603
+ /**
604
+ * The language (default NULL, implies "en").
605
+ */
606
+ char *language;
607
+ /**
608
+ * Indicates whether the message is from the current logged in user.
609
+ */
610
+ int is_current_user;
611
+ /**
612
+ * The displayname, if the participant_uri had a displayname.
613
+ */
614
+ char *participant_displayname;
615
+ } vx_evt_transcribed_message_t;
616
+ #ifndef DOXYGEN_MAM_SKIP
617
+ /**
618
+ * Presented when a channel history query is completed.
619
+ * There is one vx_evt_session_archive_query_end event for every query started with a vx_req_session_archive_query request.
620
+ * \ingroup session
621
+ */
622
+ typedef struct vx_evt_session_archive_query_end {
623
+ /**
624
+ * The common properties for all events.
625
+ */
626
+ vx_evt_base_t base;
627
+
628
+ /**
629
+ * The handle used in vx_req_sessiongroup_addsession.
630
+ * \see vx_req_sessiongroup_addsession
631
+ */
632
+ VX_HANDLE sessiongroup_handle;
633
+
634
+ /**
635
+ * The handle returned from a successful session add request.
636
+ * \see vx_req_sessiongroup_add_session
637
+ */
638
+ VX_HANDLE session_handle;
639
+
640
+ /**
641
+ * The ID of the query in progress.
642
+ * This ID is returned for a successfully started query in a vx_resp_session_archive_query response.
643
+ */
644
+ char *query_id;
645
+
646
+ /**
647
+ * The query result code.
648
+ * This is similar to a response result_code.
649
+ */
650
+ int return_code;
651
+
652
+ /**
653
+ * The query status code.
654
+ * This is similar to a response status_code.
655
+ */
656
+ int status_code;
657
+
658
+ /**
659
+ * The first returned message ID.
660
+ * This ID can be used for paging.
661
+ */
662
+ char *first_id;
663
+
664
+ /**
665
+ * The last returned message ID.
666
+ * This ID can be used for paging.
667
+ */
668
+ char *last_id;
669
+
670
+ /**
671
+ * The index of the first matching message reported with a vx_evt_session_archive_message event.
672
+ */
673
+ unsigned int first_index;
674
+
675
+ /**
676
+ * The total number of messages matching the criteria specified in the %vx_req_session_archive_query request.
677
+ * This is the total size of the result set.
678
+ */
679
+ unsigned int count;
680
+
681
+ /**
682
+ * A timestamp cursor (ISO format) pointing to the next page of results.
683
+ */
684
+ char *next_cursor;
685
+ } vx_evt_session_archive_query_end_t;
686
+ #endif
687
+
688
+
689
+ /**
690
+ * Used by the SDK sound system to present audio information to the application,
691
+ * which can be used to create a visual representation of the speaker (for example, a "VU" meter).
692
+ * These events are presented at one half the rate of the audio capture rate.
693
+ * \ingroup devices
694
+ */
695
+ typedef struct vx_evt_aux_audio_properties {
696
+ /**
697
+ * The common properties for all events.
698
+ */
699
+ vx_evt_base_t base;
700
+
701
+ /**
702
+ * \deprecated This is deprecated and should not be used.
703
+ * @deprecated
704
+ */
705
+ vx_aux_audio_properties_state state;
706
+
707
+ /**
708
+ * A flag used to determine whether the mic is active.
709
+ * - 1 indicates that the capture device is detecting speech activity
710
+ * (as determined by the built-in Vivox Voice Activity Detector).
711
+ * - 0 indicates that no speech energy has been detected.
712
+ */
713
+ int mic_is_active;
714
+
715
+ /**
716
+ * Indicates the current value of the master microphone volume, which is set by using the "set mic volume" method.
717
+ * This is a non-negative integer value between 0 and 100 (inclusive).
718
+ */
719
+ int mic_volume;
720
+
721
+ /**
722
+ * The instantaneous (fast) energy at the capture device.
723
+ * This is a value from 0.0 to 1.0, which when graphed, show behavior similar to an analog VU Meter.
724
+ * \note For an unsmoothed dBFS value of fast energy, see fast_energy_meter and its companion *_meter values.
725
+ */
726
+ double mic_energy;
727
+
728
+ /**
729
+ * Indicates the current value of the master speaker volume, which is set by using the "set speaker volume" method.
730
+ * This is a non-negative integer value between 0 and 100 (inclusive).
731
+ */
732
+ int speaker_volume;
733
+
734
+ /**
735
+ * The energy associated with any rendered audio.
736
+ */
737
+ double speaker_energy;
738
+
739
+ /**
740
+ * Indicates whether voice is detected in the rendered audio stream at this moment.
741
+ */
742
+ int speaker_is_active;
743
+
744
+ /**
745
+ * The instantaneous (fast) energy at the capture device.
746
+ * This is a floating point number between 0 and 1, which is logarithmically spaced representing -Inf dBFS to +0dBFS.
747
+ */
748
+ double fast_energy_meter;
749
+
750
+ /**
751
+ * The current noise floor estimate.
752
+ * This is a floating point number between 0 and 1, which is logarithmically spaced representing -Inf dBFS to +0dBFS.
753
+ */
754
+ double noise_floor_meter;
755
+
756
+ /**
757
+ * The current magnitude that "fast energy" must surpass to activate speech.
758
+ * This ranges between noise_floor and -9dBFS.
759
+ * This is a floating point number between 0 and 1, which is logarithmically spaced representing -Inf dBFS to +0dBFS.
760
+ */
761
+ double speech_threshold_meter;
762
+ } vx_evt_aux_audio_properties_t;
763
+
764
+ /**
765
+ * For vx_evt_buddy_changed_t and vx_evt_buddy_group_changed_t objects, indicates whether the object was set (added or updated) or deleted.
766
+ * \ingroup buddy
767
+ */
768
+ typedef enum {
769
+ /**
770
+ * The buddy or group was added or updated.
771
+ */
772
+ change_type_set = 1,
773
+
774
+ /**
775
+ * The buddy or group was deleted
776
+ */
777
+ change_type_delete = 2
778
+ } vx_change_type_t;
779
+
780
+ /**
781
+ * Presented when a buddy is either set (added or updated) or removed.
782
+ * \ingroup buddy
783
+ */
784
+ typedef struct vx_evt_buddy_changed {
785
+ /**
786
+ * The common properties for all events.
787
+ */
788
+ vx_evt_base_t base;
789
+
790
+ /**
791
+ * The handle returned from a successful login request.
792
+ */
793
+ VX_HANDLE account_handle;
794
+
795
+ /**
796
+ * Indicates the change type (set or delete).
797
+ */
798
+ vx_change_type_t change_type;
799
+
800
+ /**
801
+ * The URI of the buddy.
802
+ */
803
+ char *buddy_uri;
804
+
805
+ /**
806
+ * The display name of the buddy.
807
+ */
808
+ char *display_name;
809
+
810
+ /**
811
+ * Application-specific buddy data.
812
+ */
813
+ char *buddy_data;
814
+
815
+ /**
816
+ * The group that the buddy belongs to.
817
+ */
818
+ int group_id;
819
+
820
+ /**
821
+ * \deprecated This is deprecated and should not be used.
822
+ * The account ID of the buddy.
823
+ * @deprecated
824
+ */
825
+ int account_id;
826
+ } vx_evt_buddy_changed_t;
827
+
828
+ /**
829
+ * Presented when a buddy group is set (added or updated) or removed.
830
+ * \ingroup buddy
831
+ */
832
+ typedef struct vx_evt_buddy_group_changed {
833
+ /**
834
+ * The common properties for all events.
835
+ */
836
+ vx_evt_base_t base;
837
+
838
+ /**
839
+ * The handle returned from a successful login request.
840
+ */
841
+ VX_HANDLE account_handle;
842
+
843
+ /**
844
+ * Indicates the change type (set or delete).
845
+ */
846
+ vx_change_type_t change_type;
847
+
848
+ /**
849
+ * The ID for the group.
850
+ */
851
+ int group_id;
852
+
853
+ /**
854
+ * The display name for the group.
855
+ */
856
+ char *group_name;
857
+
858
+ /**
859
+ * Application-specific group data.
860
+ */
861
+ char *group_data;
862
+ } vx_evt_buddy_group_changed_t;
863
+
864
+ /**
865
+ * Presented when the buddy or group list undergoes a significant change.
866
+ * This event is always received after login, and can be used to build the initial buddy and group UI.
867
+ * \ingroup buddy
868
+ */
869
+ typedef struct vx_evt_buddy_and_group_list_changed {
870
+ /**
871
+ * The common properties for all events.
872
+ */
873
+ vx_evt_base_t base;
874
+
875
+ /**
876
+ * The handle returned from a successful login request.
877
+ */
878
+ VX_HANDLE account_handle;
879
+
880
+ /**
881
+ * The count of the number of buddies.
882
+ */
883
+ int buddy_count;
884
+
885
+ /**
886
+ * An array of pointers to buddies.
887
+ */
888
+ vx_buddy_t **buddies;
889
+
890
+ /**
891
+ * The count of the number of groups.
892
+ */
893
+ int group_count;
894
+
895
+ /**
896
+ * An array of buddy group pointers.
897
+ */
898
+ vx_group_t **groups;
899
+ } vx_evt_buddy_and_group_list_changed_t;
900
+
901
+ /**
902
+ * Raised to indicate to the application that a particular
903
+ * keyboard/mouse button combination has been pressed or cleared.
904
+ * \ingroup devices
905
+ * \attention Not supported on the iPhone platform.
906
+ */
907
+ typedef struct vx_evt_keyboard_mouse {
908
+ /**
909
+ * The common properties for all events.
910
+ */
911
+ vx_evt_base_t base;
912
+
913
+ /**
914
+ * The name of the binding as set in vx_req_aux_global_monitor_keyboard_mouse_t.
915
+ */
916
+ char *name;
917
+
918
+ /**
919
+ * 1 if the key/mouse button combination corresponding to this name is down.
920
+ * 0 if the key/mouse button combination corresponding to this name has been cleared.
921
+ */
922
+ int is_down;
923
+ } vx_evt_keyboard_mouse_t;
924
+
925
+ /**
926
+ * Raised to indicate to the application that the user has transitioned between
927
+ * an idle and non-idle state (in either order).
928
+ * \ingroup devices
929
+ * \attention Not supported on the iPhone platform.
930
+ */
931
+ typedef struct vx_evt_idle_state_changed {
932
+ /**
933
+ * The common properties for all events.
934
+ */
935
+ vx_evt_base_t base;
936
+
937
+ /**
938
+ * 1 if the user is idle.
939
+ * 0 if the user is not idle.
940
+ */
941
+ int is_idle;
942
+ } vx_evt_idle_state_changed_t;
943
+
944
+ /**
945
+ * The common structure for holding call-related statistics.
946
+ */
947
+ typedef struct vx_call_stats {
948
+ /**
949
+ * RESERVED FOR FUTURE USE
950
+ */
951
+ int insufficient_bandwidth;
952
+
953
+ /**
954
+ * RESERVED FOR FUTURE USE
955
+ */
956
+ int min_bars;
957
+
958
+ /**
959
+ * RESERVED FOR FUTURE USE
960
+ */
961
+ int max_bars;
962
+
963
+ /**
964
+ * An indication of the network quality in the range of 1-5, with 5 indicating the best quality.
965
+ */
966
+ int current_bars;
967
+
968
+ /**
969
+ * RESERVED FOR FUTURE USE
970
+ */
971
+ int pk_loss;
972
+
973
+ /**
974
+ * The number of packets received.
975
+ */
976
+ int incoming_received;
977
+
978
+ /**
979
+ * RESERVED FOR FUTURE USE
980
+ */
981
+ int incoming_expected;
982
+
983
+ /**
984
+ * The number of packets lost in the network.
985
+ */
986
+ int incoming_packetloss;
987
+
988
+ /**
989
+ * The number of packets received too late to be useful and discarded.
990
+ */
991
+ int incoming_out_of_time;
992
+
993
+ /**
994
+ * The number of packets received but discarded because the local queue overflowed.
995
+ */
996
+ int incoming_discarded;
997
+
998
+ /**
999
+ * The number of packets sent.
1000
+ */
1001
+ int outgoing_sent;
1002
+
1003
+ /**
1004
+ * The number of render device underruns.
1005
+ * \note Mobile platforms only.
1006
+ */
1007
+ int render_device_underruns;
1008
+
1009
+ /**
1010
+ * The number of render device overruns.
1011
+ * \note Mobile platforms only.
1012
+ */
1013
+ int render_device_overruns;
1014
+
1015
+ /**
1016
+ * The number of render device errors.
1017
+ * \note Mobile platforms only.
1018
+ */
1019
+ int render_device_errors;
1020
+
1021
+ /**
1022
+ * The SIP call ID.
1023
+ */
1024
+ char *call_id;
1025
+
1026
+ /**
1027
+ * A flag that indicates whether packet loss concealment (error correction) has happened.
1028
+ */
1029
+ int plc_on;
1030
+
1031
+ /**
1032
+ * The number of 10ms synthetic frames generated by packet loss concealment.
1033
+ */
1034
+ int plc_synthetic_frames;
1035
+
1036
+ /**
1037
+ * A codec negotiated in the current call.
1038
+ */
1039
+ char *codec_name;
1040
+
1041
+ /**
1042
+ * \deprecated This is deprecated and should not be used.
1043
+ * @deprecated
1044
+ */
1045
+ int codec_mode;
1046
+
1047
+ /**
1048
+ * The minimum network latency detected in seconds.
1049
+ * This is zero if no latency measurements are made.
1050
+ */
1051
+ double min_latency;
1052
+
1053
+ /**
1054
+ * The maximum network latency detected in seconds.
1055
+ * This is zero if no latency measurements are made.
1056
+ */
1057
+ double max_latency;
1058
+
1059
+ /**
1060
+ * The number of times that latency was measured.
1061
+ */
1062
+ int latency_measurement_count;
1063
+
1064
+ /**
1065
+ * The total number of seconds of measured network latency.
1066
+ */
1067
+ double latency_sum;
1068
+
1069
+ /**
1070
+ * The last latency that was measured.
1071
+ */
1072
+ double last_latency_measured;
1073
+
1074
+ /**
1075
+ * The number of times that latency packet were received where their prior expected response was not received.
1076
+ */
1077
+ int latency_packets_lost;
1078
+
1079
+ /**
1080
+ * A computation of quality.
1081
+ */
1082
+ double r_factor;
1083
+
1084
+ /**
1085
+ * The number of latency measurement request packets sent.
1086
+ */
1087
+ int latency_packets_sent;
1088
+
1089
+ /**
1090
+ * The number of latency measurement response packets lost.
1091
+ */
1092
+ int latency_packets_dropped;
1093
+
1094
+ /**
1095
+ * The number of latency measurement packets that were too short or otherwise malformed.
1096
+ */
1097
+ int latency_packets_malformed;
1098
+
1099
+ /**
1100
+ * The number of latency measurement packets that arrived before they were sent.
1101
+ * \note This can occur if there are clock adjustments.
1102
+ */
1103
+ int latency_packets_negative_latency;
1104
+
1105
+ /**
1106
+ * The beginning of the sample period in fractional seconds since midnight January 1, 1970 GMT.
1107
+ */
1108
+ double sample_interval_begin;
1109
+
1110
+ /**
1111
+ * The end of the sample period in fractional seconds since midnight January 1, 1970 GMT.
1112
+ */
1113
+ double sample_interval_end;
1114
+
1115
+ /**
1116
+ * The number of intervals where 0, 1, 2, 3, or 4 or greater audio frames were read from the capture device.
1117
+ */
1118
+ int capture_device_consecutively_read_count[5];
1119
+
1120
+ /**
1121
+ * The OPUS bit rate that was used for encoding the last transmitted OPUS packet.
1122
+ * This is -1 if no OPUS packets were transmitted.
1123
+ */
1124
+ int current_opus_bit_rate;
1125
+
1126
+ /**
1127
+ * The OPUS complexity that was used for encoding the last transmitted OPUS packet.
1128
+ * This is -1 if no OPUS packets were transmitted.
1129
+ */
1130
+ int current_opus_complexity;
1131
+
1132
+ /**
1133
+ * The OPUS VBR mode (vx_opus_vbr_mode) that was used for encoding the last transmitted OPUS packet.
1134
+ * This is -1 if no OPUS packets were transmitted.
1135
+ */
1136
+ int current_opus_vbr_mode;
1137
+
1138
+ /**
1139
+ * The OPUS bandwith (vx_opus_bandwidth) that was used for encoding the last transmitted OPUS packet.
1140
+ * This is -1 if no OPUS packets were transmitted.
1141
+ */
1142
+ int current_opus_bandwidth;
1143
+
1144
+ /**
1145
+ * The OPUS max packet size limit that was used for encoding the last transmitted OPUS packet.
1146
+ * This is -1 if no OPUS packets were transmitted.
1147
+ */
1148
+ int current_opus_max_packet_size;
1149
+ } vx_call_stats_t;
1150
+
1151
+ /**
1152
+ * Sent when session media has been altered.
1153
+ * \ingroup session
1154
+ */
1155
+ typedef struct vx_evt_media_stream_updated {
1156
+ /**
1157
+ * The common properties for all events.
1158
+ */
1159
+ vx_evt_base_t base;
1160
+
1161
+ /**
1162
+ * The handle created for the session group.
1163
+ */
1164
+ VX_HANDLE sessiongroup_handle;
1165
+
1166
+ /**
1167
+ * The handle created for the session.
1168
+ */
1169
+ VX_HANDLE session_handle;
1170
+
1171
+ /**
1172
+ * The code used to identify why a state change has been made.
1173
+ * This code is only useful if the state is equal to session_media_disconnected.
1174
+ * In this case, the following rules apply:
1175
+ * - 1. Any code < 400 can be ignored.
1176
+ * - 2. 401 - A password is needed to join this channel. Typically, an application presents a password dialog at this point. You can retry the request if you obtain a password from the user.
1177
+ * - 3. 403 - If the call is to a channel, the user does not have sufficient privilege to join the channel. Otherwise, the call has been declined.
1178
+ * - 4. 404 - The destination (either a channel or other user) does not exist.
1179
+ * - 5. 408 - The remote user did not answer the call. You can retry the request after a 10s delay.
1180
+ * - 6. 480 - The remote user is temporarily offline. You can retry the request after a 10s delay.
1181
+ * - 7. 486 - The remote user is busy (on another call). You can retry the request after a 10s delay.
1182
+ * - 8. 503 - The server is busy (overloaded). You can retry the request after a 10s delay.
1183
+ * - 9. 603 - The remote user has declined the call.
1184
+ * The application should only retry a failed request if there is a chance the retry will succeed, as indicated in the preceding list.
1185
+ * It is recommended that the status_string field only be displayed as diagnostic information for status codes > 400, and not the codes in the preceding list.
1186
+ * This status_string is often generated by the network, which can also include public PSTN networks.
1187
+ * This can result in status_string values that are informative to a technician, but not to an end user, and can be subject to change.
1188
+ * Applications should not depend on the value of this field.
1189
+ * Applications should present an application-specific message for each of the status codes outlined in the preceding list.
1190
+ */
1191
+ int status_code;
1192
+
1193
+ /**
1194
+ * Text (in English) to describe the status code.
1195
+ * For more information, refer to the vx_evt_media_stream_updated status_code description.
1196
+ */
1197
+ char *status_string;
1198
+
1199
+ /**
1200
+ * The new state of the entity.
1201
+ * Refer to the codes in table \ref vx_session_media_state
1202
+ */
1203
+ vx_session_media_state state;
1204
+
1205
+ /**
1206
+ * Indicates whether this is an incoming call.
1207
+ */
1208
+ int incoming;
1209
+
1210
+ /**
1211
+ * The durable media identifier used to access value add services.
1212
+ */
1213
+ char *durable_media_id;
1214
+
1215
+ /**
1216
+ * The current media probe server.
1217
+ */
1218
+ char *media_probe_server;
1219
+
1220
+ /**
1221
+ * NULL, except for state session_media_disconnected.
1222
+ */
1223
+ vx_call_stats_t *call_stats;
1224
+ } vx_evt_media_stream_updated_t;
1225
+
1226
+ /**
1227
+ * Sent when the session text has been altered.
1228
+ * \ingroup session
1229
+ */
1230
+ typedef struct vx_evt_text_stream_updated {
1231
+ /**
1232
+ * The common properties for all events.
1233
+ */
1234
+ vx_evt_base_t base;
1235
+
1236
+ /**
1237
+ * The handle created for the session group.
1238
+ */
1239
+ VX_HANDLE sessiongroup_handle;
1240
+
1241
+ /**
1242
+ * The handle created for the session.
1243
+ */
1244
+ VX_HANDLE session_handle;
1245
+
1246
+ /**
1247
+ * Indicates whether text is enabled on the session.
1248
+ */
1249
+ int enabled;
1250
+
1251
+ /**
1252
+ * Indicates the state of text (connected or disconnected).
1253
+ */
1254
+ vx_session_text_state state;
1255
+
1256
+ /**
1257
+ * Indicates whether this is incoming.
1258
+ */
1259
+ int incoming;
1260
+
1261
+ /**
1262
+ * Code used to identify why a state change has been made.
1263
+ * These codes are only useful for when the state is equal to session_text_disconnected.
1264
+ * For a description of these status codes, see \ref vx_evt_media_stream_updated
1265
+ */
1266
+ int status_code;
1267
+
1268
+ /**
1269
+ * Text (in English) used to describe the status code.
1270
+ * For guidelines on using this field, see \ref vx_evt_media_stream_updated
1271
+ */
1272
+ char *status_string;
1273
+ } vx_evt_text_stream_updated_t;
1274
+
1275
+ /**
1276
+ * Sent when a session group is added.
1277
+ * \ingroup sessiongroup
1278
+ */
1279
+ typedef struct vx_evt_sessiongroup_added {
1280
+ /**
1281
+ * The common properties for all events.
1282
+ */
1283
+ vx_evt_base_t base;
1284
+
1285
+ /**
1286
+ * Returned from a successful session group create request.
1287
+ */
1288
+ VX_HANDLE sessiongroup_handle;
1289
+
1290
+ /**
1291
+ * Returned from a successful session group login request.
1292
+ */
1293
+ VX_HANDLE account_handle;
1294
+
1295
+ /**
1296
+ * The session group type.
1297
+ */
1298
+ vx_sessiongroup_type type;
1299
+
1300
+ /**
1301
+ * The identity that is presented on all subsequent communications from this session group to a remote user.
1302
+ */
1303
+ char *alias_username;
1304
+ } vx_evt_sessiongroup_added_t;
1305
+
1306
+ /**
1307
+ * Sent when a session group is removed.
1308
+ * \ingroup sessiongroup
1309
+ */
1310
+ typedef struct vx_evt_sessiongroup_removed {
1311
+ /**
1312
+ * The common properties for all events.
1313
+ */
1314
+ vx_evt_base_t base;
1315
+
1316
+ /**
1317
+ * Returned from a successful session group create request.
1318
+ */
1319
+ VX_HANDLE sessiongroup_handle;
1320
+ } vx_evt_sessiongroup_removed_t;
1321
+
1322
+ /**
1323
+ * Sent when a session is added.
1324
+ * \ingroup session
1325
+ */
1326
+ typedef struct vx_evt_session_added {
1327
+ /**
1328
+ * The common properties for all events.
1329
+ */
1330
+ vx_evt_base_t base;
1331
+
1332
+ /**
1333
+ * The handle returned from a successful session group create request.
1334
+ */
1335
+ VX_HANDLE sessiongroup_handle;
1336
+
1337
+ /**
1338
+ * The handle returned from a successful session add request.
1339
+ */
1340
+ VX_HANDLE session_handle;
1341
+
1342
+ /**
1343
+ * The full URI of the session (user/channel).
1344
+ */
1345
+ char *uri;
1346
+
1347
+ /**
1348
+ * Set to 1 if this session relates to a channel.
1349
+ * Set to 0 if this session is not related to a channel.
1350
+ */
1351
+ int is_channel;
1352
+
1353
+ /**
1354
+ * Set to 1 if this is a session that was added because it was an incoming call.
1355
+ * Set to 0 for all other cases.
1356
+ */
1357
+ int incoming;
1358
+
1359
+ /**
1360
+ * The name of the channel, if passed in when the channel is created.
1361
+ * This is always empty for incoming sessions.
1362
+ */
1363
+ char *channel_name;
1364
+
1365
+ /**
1366
+ * \deprecated This is deprecated and should not be used.
1367
+ * @deprecated
1368
+ */
1369
+ char *displayname;
1370
+
1371
+ /**
1372
+ * \deprecated This is deprecated and should not be used.
1373
+ * @deprecated
1374
+ */
1375
+ char *application;
1376
+
1377
+ /**
1378
+ * The identity of the remote user if P2P, or null if a channel call.
1379
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the remote user.
1380
+ */
1381
+ char *alias_username;
1382
+ } vx_evt_session_added_t;
1383
+
1384
+ /**
1385
+ * Sent when a session is removed.
1386
+ * \ingroup session
1387
+ */
1388
+ typedef struct vx_evt_session_removed {
1389
+ /**
1390
+ * The common properties for all events.
1391
+ */
1392
+ vx_evt_base_t base;
1393
+
1394
+ /**
1395
+ * The handle returned from a successful session group create request.
1396
+ */
1397
+ VX_HANDLE sessiongroup_handle;
1398
+
1399
+ /**
1400
+ * The handle returned from a successful session add request.
1401
+ */
1402
+ VX_HANDLE session_handle;
1403
+
1404
+ /**
1405
+ * The full URI of the session (user/channel).
1406
+ */
1407
+ char *uri;
1408
+ } vx_evt_session_removed_t;
1409
+
1410
+ /**
1411
+ * Presented when a participant is added to a session.
1412
+ * When joining a channel, a participant added event is raised for all active participants in the channel.
1413
+ * \ingroup session
1414
+ */
1415
+ typedef struct vx_evt_participant_added {
1416
+ /**
1417
+ * The common properties for all events.
1418
+ */
1419
+ vx_evt_base_t base;
1420
+
1421
+ /**
1422
+ * The handle returned from a successful session group create request.
1423
+ */
1424
+ VX_HANDLE sessiongroup_handle;
1425
+
1426
+ /**
1427
+ * The handle returned from a successful session create request.
1428
+ */
1429
+ VX_HANDLE session_handle;
1430
+
1431
+ /**
1432
+ * The URI of the participant whose state has changed.
1433
+ */
1434
+ char *participant_uri;
1435
+
1436
+ /**
1437
+ * The account name of the participant.
1438
+ */
1439
+ char *account_name;
1440
+
1441
+ /**
1442
+ * \deprecated Use displayname instead.
1443
+ * @deprecated
1444
+ */
1445
+ char *display_name;
1446
+
1447
+ /**
1448
+ * \deprecated This is deprecated and should not be used.
1449
+ * @deprecated
1450
+ */
1451
+ int participant_type;
1452
+
1453
+ /**
1454
+ * \deprecated This is deprecated and should not be used.
1455
+ * @deprecated
1456
+ */
1457
+ char *application;
1458
+
1459
+ /**
1460
+ * Indicates whether the user is an authenticated user (0) or is logged in anonymously as a guest (1).
1461
+ * \note This is only supported on channel calls.
1462
+ */
1463
+ int is_anonymous_login;
1464
+
1465
+ /**
1466
+ * The display name of the participant if in a channel or a P2P-initiated session.
1467
+ * \note This field is not populated for the callee in a text-initiated P2P session.
1468
+ * This field will contain one of the following values (in order), based on availability:
1469
+ * - 1) The buddy display name
1470
+ * - 2) The SIP display name (only available for the callee, not available for the caller)
1471
+ * - 3) The account name (not available if the account is out of domain)
1472
+ * - 4) The URI without the SIP (ex: username@foo.vivox.com)
1473
+ */
1474
+ char *displayname;
1475
+
1476
+ /**
1477
+ * The identity of the user if P2P, or null if a channel call.
1478
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the remote user.
1479
+ */
1480
+ char *alias_username;
1481
+
1482
+ /**
1483
+ * The encoded URI for the user with the tag.
1484
+ * This uniquely identifies users that might appear multiple times in a channel.
1485
+ */
1486
+ char *encoded_uri_with_tag;
1487
+
1488
+ /**
1489
+ * Indicates whether the message is from the current logged in user.
1490
+ */
1491
+ int is_current_user;
1492
+ } vx_evt_participant_added_t;
1493
+
1494
+ /**
1495
+ * Presented when a participant is removed from a session.
1496
+ * \ingroup session
1497
+ */
1498
+ typedef struct vx_evt_participant_removed {
1499
+ /**
1500
+ * The common properties for all events.
1501
+ */
1502
+ vx_evt_base_t base;
1503
+
1504
+ /**
1505
+ * The handle returned from a successful session group create request.
1506
+ */
1507
+ VX_HANDLE sessiongroup_handle;
1508
+
1509
+ /**
1510
+ * The handle returned from a successful session create request.
1511
+ */
1512
+ VX_HANDLE session_handle;
1513
+
1514
+ /**
1515
+ * The URI of the participant whose state has changed.
1516
+ */
1517
+ char *participant_uri;
1518
+
1519
+ /**
1520
+ * The account name of the participant.
1521
+ */
1522
+ char *account_name;
1523
+
1524
+ /**
1525
+ * The reason why the participant was removed from the session.
1526
+ * The default is "left". See \ref vx_participant_removed_reason
1527
+ */
1528
+ vx_participant_removed_reason reason;
1529
+
1530
+ /**
1531
+ * The identity of the user if P2P, or null if a channel call.
1532
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the original sender.
1533
+ */
1534
+ char *alias_username;
1535
+
1536
+ /**
1537
+ * The encoded URI for the user with the tag.
1538
+ * This uniquely identifies users that might appear multiple times in a channel.
1539
+ */
1540
+ char *encoded_uri_with_tag;
1541
+
1542
+ /**
1543
+ * Indicates whether the message is from the current logged in user.
1544
+ */
1545
+ int is_current_user;
1546
+ } vx_evt_participant_removed_t;
1547
+
1548
+ /**
1549
+ * The special state of the local voice participant that is used to indicate that the participant
1550
+ * is attemping to speak while the system is in a state that will not transmit the participant's audio.
1551
+ */
1552
+ typedef enum {
1553
+ participant_diagnostic_state_speaking_while_mic_muted = 1,
1554
+ participant_diagnostic_state_speaking_while_mic_volume_zero = 2,
1555
+ participant_diagnostic_state_no_capture_device = 3,
1556
+ participant_diagnostic_state_no_render_device = 4,
1557
+ participant_diagnostic_state_capture_device_read_errors = 5,
1558
+ participant_diagnostic_state_render_device_write_errors = 6
1559
+ } vx_participant_diagnostic_state_t;
1560
+
1561
+ /**
1562
+ * Received when the properties of the participant change
1563
+ * For example: mod muted, speaking, volume, energy, or typing notifications.
1564
+ * \ingroup session
1565
+ */
1566
+ typedef struct vx_evt_participant_updated {
1567
+ /**
1568
+ * The common properties for all events.
1569
+ */
1570
+ vx_evt_base_t base;
1571
+
1572
+ /**
1573
+ * The handle returned from a successful session group create request.
1574
+ */
1575
+ VX_HANDLE sessiongroup_handle;
1576
+
1577
+ /**
1578
+ * The handle returned from a successful session create request.
1579
+ */
1580
+ VX_HANDLE session_handle;
1581
+
1582
+ /**
1583
+ * The URI of the participant whose properties are being updated.
1584
+ */
1585
+ char *participant_uri;
1586
+
1587
+ /**
1588
+ * Used to determine if the user has been muted by the moderator.
1589
+ * - 0 indicates the user was not muted.
1590
+ * - 1 indicates the user was muted.
1591
+ */
1592
+ int is_moderator_muted;
1593
+
1594
+ /**
1595
+ * Indicates if the participant is speaking.
1596
+ */
1597
+ int is_speaking;
1598
+
1599
+ /**
1600
+ * This is the volume level that has been set by the user.
1601
+ * This is a non-negative integer value between 0 and 100 (inclusive), and should not change often.
1602
+ */
1603
+ int volume;
1604
+
1605
+ /**
1606
+ * The energy, or the intensity, of the participant audio.
1607
+ * This is used to determine how loud the user is speaking.
1608
+ * This is a value between 0 and 1.
1609
+ */
1610
+ double energy;
1611
+
1612
+ /**
1613
+ * This indicates which media the user is participating in.
1614
+ * See #VX_MEDIA_FLAGS_AUDIO and #VX_MEDIA_FLAGS_TEXT
1615
+ */
1616
+ int active_media;
1617
+
1618
+ /**
1619
+ * Indicates whether the participant's audio is locally muted for the user.
1620
+ */
1621
+ int is_muted_for_me;
1622
+
1623
+ /**
1624
+ * Indicates whether the participant's text is locally muted for the user.
1625
+ */
1626
+ int is_text_muted_for_me;
1627
+
1628
+ /**
1629
+ * Used to determine if the user's text has been muted by the moderator.
1630
+ * - 0 indicates the text was not muted.
1631
+ * - 1 indicates the text was muted.
1632
+ */
1633
+ int is_moderator_text_muted;
1634
+
1635
+ /**
1636
+ * The type of the participant.
1637
+ * \see vx_participant_type
1638
+ */
1639
+ vx_participant_type type;
1640
+
1641
+ /**
1642
+ * A list of diagnostic states, which tells the application the following information:
1643
+ * - The participant is attempting to speak, but the system is not in a state to propogate that speech (for example, the mic is muted).
1644
+ * - The participant has unavailable capture or render devices due to certain causes.
1645
+ */
1646
+ vx_participant_diagnostic_state_t *diagnostic_states;
1647
+
1648
+ /**
1649
+ * The total number of diagnostic states.
1650
+ */
1651
+ int diagnostic_state_count;
1652
+
1653
+ /**
1654
+ * The identity of the user if P2P, or NULL if a channel call.
1655
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the original sender.
1656
+ */
1657
+ char *alias_username;
1658
+
1659
+ /**
1660
+ * The encoded URI for the user with the tag.
1661
+ * This uniquely identifies users that might appear multiple times in a channel.
1662
+ */
1663
+ char *encoded_uri_with_tag;
1664
+
1665
+ /**
1666
+ * Indicates whether the message is from the current logged in user.
1667
+ */
1668
+ int is_current_user;
1669
+
1670
+ /**
1671
+ * Indicates if the participant's capture device is unavailable due to reasons other than muting.
1672
+ * Check the event's diagnostic_states for the cause (available for local participants only).
1673
+ * - If the participant's render device is still operating, then the participant is "listen only".
1674
+ * - If both the capture and render devices are unavailable, then the participant is "unavailable"/"on hold".
1675
+ */
1676
+ int has_unavailable_capture_device;
1677
+
1678
+ /**
1679
+ * Indicates if the participant's render device is unavailable.
1680
+ * Check the event's diagnostic_states for the cause (available for local participants only).
1681
+ * - If the participant's capture device is still operating, then the participant is "speak only"/"deaf".
1682
+ * - If both the capture and render devices are unavailable, then the participant is "unavailable"/"on hold".
1683
+ */
1684
+ int has_unavailable_render_device;
1685
+ } vx_evt_participant_updated_t;
1686
+
1687
+ /**
1688
+ * Posted after a frame has been played.
1689
+ * When playback has been stopped by the application, the first, current, and total frames are equal to zero.
1690
+ * \ingroup csr
1691
+ */
1692
+ typedef struct vx_evt_sessiongroup_playback_frame_played {
1693
+ /**
1694
+ * The common properties for all events.
1695
+ */
1696
+ vx_evt_base_t base;
1697
+
1698
+ /**
1699
+ * The handle returned from a successful session group create request.
1700
+ */
1701
+ VX_HANDLE sessiongroup_handle;
1702
+
1703
+ /**
1704
+ * The sequence number of the first frame.
1705
+ */
1706
+ int first_frame;
1707
+
1708
+ /**
1709
+ * The current frame sequences number.
1710
+ */
1711
+ int current_frame;
1712
+
1713
+ /**
1714
+ * The total number of frames available.
1715
+ */
1716
+ int total_frames;
1717
+ } vx_evt_sessiongroup_playback_frame_played_t;
1718
+
1719
+ /**
1720
+ * Sent when a session is updated.
1721
+ * \ingroup session
1722
+ */
1723
+ typedef struct vx_evt_session_updated {
1724
+ /**
1725
+ * The common properties for all events.
1726
+ */
1727
+ vx_evt_base_t base;
1728
+
1729
+ /**
1730
+ * The handle returned from a successful session group create request.
1731
+ */
1732
+ VX_HANDLE sessiongroup_handle;
1733
+
1734
+ /**
1735
+ * The handle returned from a successful session add request.
1736
+ */
1737
+ VX_HANDLE session_handle;
1738
+
1739
+ /**
1740
+ * The full URI of the session.
1741
+ */
1742
+ char *uri;
1743
+
1744
+ /**
1745
+ * Indicates whether the session's audio is muted.
1746
+ */
1747
+ int is_muted;
1748
+
1749
+ /**
1750
+ * The volume of this session.
1751
+ */
1752
+ int volume;
1753
+
1754
+ /**
1755
+ * Indicates whether the session is transmitting.
1756
+ */
1757
+ int transmit_enabled;
1758
+
1759
+ /**
1760
+ * Indicates whether the session has focus.
1761
+ */
1762
+ int is_focused;
1763
+
1764
+ /**
1765
+ * The position of the virtual "mouth".
1766
+ * This three vector is a right handed Cartesian coordinate, with the positive axis pointing towards the speaker's right,
1767
+ * the positive Y axis pointing up, and the positive Z axis pointing towards the speaker.
1768
+ */
1769
+ double speaker_position[3]; // {x, y, z}
1770
+
1771
+ /**
1772
+ * The ID of the session font applied to this session.
1773
+ * 0 = none.
1774
+ */
1775
+ int session_font_id;
1776
+
1777
+ /**
1778
+ * Indicates whether the session's text is muted.
1779
+ */
1780
+ int is_text_muted;
1781
+
1782
+ /**
1783
+ * Indicates whether there is an audio ad playing in this session.
1784
+ */
1785
+ int is_ad_playing;
1786
+ } vx_evt_session_updated_t;
1787
+
1788
+ /**
1789
+ * Sent when a session group is updated.
1790
+ * \ingroup sessiongroup
1791
+ */
1792
+ typedef struct vx_evt_sessiongroup_updated {
1793
+ /**
1794
+ * The common properties for all events.
1795
+ */
1796
+ vx_evt_base_t base;
1797
+
1798
+ /**
1799
+ * The handle returned from a successful session group create request.
1800
+ */
1801
+ VX_HANDLE sessiongroup_handle;
1802
+
1803
+ /**
1804
+ * \deprecated This is deprecated and should not be used.
1805
+ * Indicates whether in delayed playback.
1806
+ * When in delayed playback, the mic is not active.
1807
+ * \ingroup obsolete
1808
+ * @deprecated
1809
+ */
1810
+ int in_delayed_playback;
1811
+
1812
+ /**
1813
+ * \deprecated This is deprecated and should not be used.
1814
+ * Indicates the playback speed.
1815
+ * \ingroup obsolete
1816
+ * @deprecated
1817
+ */
1818
+ double current_playback_speed;
1819
+
1820
+ /**
1821
+ * \deprecated This is deprecated and should not be used.
1822
+ * Indicates the playback mode.
1823
+ * \ingroup obsolete
1824
+ * @deprecated
1825
+ */
1826
+ vx_sessiongroup_playback_mode current_playback_mode;
1827
+
1828
+ /**
1829
+ * \deprecated This is deprecated and should not be used.
1830
+ * Indicates whether playback is paused.
1831
+ * \ingroup obsolete
1832
+ * @deprecated
1833
+ */
1834
+ int playback_paused;
1835
+
1836
+ /**
1837
+ * \deprecated This is deprecated and should not be used.
1838
+ * The total capacity of the loop buffer.
1839
+ * \ingroup obsolete
1840
+ * @deprecated
1841
+ */
1842
+ int loop_buffer_capacity;
1843
+
1844
+ /**
1845
+ * \deprecated This is deprecated and should not be used.
1846
+ * The sequence number of first frame in the loop buffer.
1847
+ * This starts increasing when the loop buffer fills.
1848
+ * \ingroup obsolete
1849
+ * @deprecated
1850
+ */
1851
+ int first_loop_frame;
1852
+
1853
+ /**
1854
+ * \deprecated This is deprecated and should not be used.
1855
+ * The total number of frames captured to the loop buffer since recording started.
1856
+ * This peaks when the loop buffer fills.
1857
+ * \ingroup obsolete
1858
+ * @deprecated
1859
+ */
1860
+ int total_loop_frames_captured;
1861
+
1862
+ /**
1863
+ * \deprecated This is deprecated and should not be used.
1864
+ * The sequence number of the last frame played.
1865
+ * \ingroup obsolete
1866
+ * @deprecated
1867
+ */
1868
+ int last_loop_frame_played;
1869
+
1870
+ /**
1871
+ * \deprecated This is deprecated and should not be used.
1872
+ * The filename currently being recorded.
1873
+ * This is empty if no file is being recorded.
1874
+ * \ingroup obsolete
1875
+ * @deprecated
1876
+ */
1877
+ char *current_recording_filename;
1878
+
1879
+ /**
1880
+ * \deprecated This is deprecated and should not be used.
1881
+ * The total number of frames recorded to file.
1882
+ * \ingroup obsolete
1883
+ * @deprecated
1884
+ */
1885
+ int total_recorded_frames;
1886
+
1887
+ /**
1888
+ * \deprecated This is deprecated and should not be used.
1889
+ * The timestamp associated with the first frame in microseconds.
1890
+ * - On non-Windows platforms, this is computed from gettimeofday().
1891
+ * - On Windows platforms, this is computed from GetSystemTimeAsFileTime()
1892
+ * \note This is for file-based recording only.
1893
+ * \ingroup obsolete
1894
+ * @deprecated
1895
+ */
1896
+ long long first_frame_timestamp_us;
1897
+ } vx_evt_sessiongroup_updated_t;
1898
+
1899
+ /**
1900
+ * Received when certain media requests have completed
1901
+ *
1902
+ * \ingroup sessiongroup
1903
+ */
1904
+ typedef struct vx_evt_media_completion {
1905
+ /**
1906
+ * The common properties for all events.
1907
+ */
1908
+ vx_evt_base_t base;
1909
+
1910
+ /**
1911
+ * The handle returned from a successful session group create request.
1912
+ * This field stays empty if the completion type is 'aux_*'.
1913
+ * \see vx_req_sessiongroup_create
1914
+ */
1915
+ VX_HANDLE sessiongroup_handle;
1916
+
1917
+ /**
1918
+ * The type of media that has completed.
1919
+ */
1920
+ vx_media_completion_type completion_type;
1921
+ } vx_evt_media_completion_t;
1922
+
1923
+ /**
1924
+ * The server can send messages to the SDK that the SDK does not need to consume.
1925
+ * These messages are propagated to the application through this event.
1926
+ * The application can choose to parse and consume these messages or to ignore them.
1927
+ */
1928
+ typedef struct vx_evt_server_app_data {
1929
+ /**
1930
+ * The common properties for all events.
1931
+ */
1932
+ vx_evt_base_t base;
1933
+
1934
+ /**
1935
+ * The handle returned from a successful account login request.
1936
+ * \see vx_req_account_login
1937
+ */
1938
+ VX_HANDLE account_handle;
1939
+
1940
+ /**
1941
+ * The type of the incoming data.
1942
+ */
1943
+ char *content_type;
1944
+
1945
+ /**
1946
+ * The content of the message being received from the server.
1947
+ */
1948
+ char *content;
1949
+ } vx_evt_server_app_data_t;
1950
+
1951
+ /**
1952
+ * Raised when a message from another user is received.
1953
+ * \note This is not to be confused with IMs - this is a P2P communication mechanism for applications to communicate custom content.
1954
+ * \see vx_req_account_send_user_app_data
1955
+ */
1956
+ typedef struct vx_evt_user_app_data {
1957
+ /**
1958
+ * The common properties for all events.
1959
+ */
1960
+ vx_evt_base_t base;
1961
+
1962
+ /**
1963
+ * The handle returned from a successful account login request.
1964
+ * \see vx_req_account_login
1965
+ */
1966
+ VX_HANDLE account_handle;
1967
+
1968
+ /**
1969
+ * The URI of the account sending the message.
1970
+ */
1971
+ char *from_uri;
1972
+
1973
+ /**
1974
+ * The type of the incoming data.
1975
+ */
1976
+ char *content_type;
1977
+
1978
+ /**
1979
+ * The content of the message being received from the specified account.
1980
+ */
1981
+ char *content;
1982
+ } vx_evt_user_app_data_t;
1983
+
1984
+ typedef enum {
1985
+ /**
1986
+ * The message that was sent when the target user was offline.
1987
+ */
1988
+ vx_evt_network_message_type_offline_message = 1,
1989
+ vx_evt_network_message_type_admin_message = 2,
1990
+ vx_evt_network_message_type_sessionless_message = 3
1991
+ } vx_evt_network_message_type;
1992
+
1993
+ /**
1994
+ * Raised when the network sends a message to a user (as opposed to a user to user message).
1995
+ * This includes messages that were stored and forwarded on behalf the user, and generic admin messages.
1996
+ */
1997
+ typedef struct vx_evt_network_message {
1998
+ /**
1999
+ * The common properties for all events.
2000
+ */
2001
+ vx_evt_base_t base;
2002
+
2003
+ /**
2004
+ * The handle returned from a successful account login request.
2005
+ * \see vx_req_account_login
2006
+ */
2007
+ VX_HANDLE account_handle;
2008
+
2009
+ /**
2010
+ * The type of the message.
2011
+ */
2012
+ vx_evt_network_message_type network_message_type;
2013
+
2014
+ /**
2015
+ * The type of the incoming data.
2016
+ */
2017
+ char *content_type;
2018
+
2019
+ /**
2020
+ * The content of the message being received from the server.
2021
+ */
2022
+ char *content;
2023
+
2024
+ /**
2025
+ * The sender of the message.
2026
+ */
2027
+ char *sender_uri;
2028
+
2029
+ /**
2030
+ * The sender display name.
2031
+ */
2032
+ char *sender_display_name;
2033
+
2034
+ /**
2035
+ * The identity that the original sender wanted to present.
2036
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the original sender.
2037
+ */
2038
+ char *sender_alias_username;
2039
+
2040
+ /**
2041
+ * The identity that the original sender wanted to send to.
2042
+ * \note This is different than the participant_uri, which is the actual internal Vivox identity of the original sender.
2043
+ */
2044
+ char *receiver_alias_username;
2045
+ } vx_evt_network_message_t;
2046
+
2047
+ /**
2048
+ * Raised when the SDK is running out of process and the connection state of the Vivox Voice Service (VVS) changes.
2049
+ * Sent when the connection is made and when the connection is lost.
2050
+ * Alerts the application so the VVS can be restarted, if needed.
2051
+ */
2052
+ typedef struct vx_evt_voice_service_connection_state_changed {
2053
+ /**
2054
+ * The common properties for all events.
2055
+ */
2056
+ vx_evt_base_t base;
2057
+
2058
+ /**
2059
+ * Indicates whether the voice service connection state is connected.
2060
+ */
2061
+ int connected;
2062
+
2063
+ /**
2064
+ * The platform of the machine that the voice service is running on
2065
+ */
2066
+ char *platform;
2067
+
2068
+ /**
2069
+ * The version of the voice service.
2070
+ */
2071
+ char *version;
2072
+
2073
+ /**
2074
+ * The data directory.
2075
+ */
2076
+ char *data_directory;
2077
+
2078
+ /**
2079
+ * Indicates whether the network test ran.
2080
+ */
2081
+ int network_test_run;
2082
+
2083
+ /**
2084
+ * Indicates whether the network test completed.
2085
+ */
2086
+ int network_test_completed;
2087
+
2088
+ /**
2089
+ * Indicates whether the network test has passed or failed.
2090
+ * This can change depending on the network connection and the power state of the machine.
2091
+ */
2092
+ int network_test_state;
2093
+
2094
+ /**
2095
+ * Indicates if the network is down.
2096
+ */
2097
+ int network_is_down;
2098
+ } vx_evt_voice_service_connection_state_changed_t;
2099
+
2100
+ typedef enum {
2101
+ /**
2102
+ * On some platforms (WinXP) with some drivers, polling to find out which devices has changed can take a long time.
2103
+ * When the SDK finds that polling can take a long time, it stops looking for device changes.
2104
+ * When this happens, vx_evt_audio_device_hot_swap is raised with event_type set to vx_audio_device_hot_swap_event_type_disabled_due_to_platform_constraints.
2105
+ */
2106
+ vx_audio_device_hot_swap_event_type_disabled_due_to_platform_constraints = 0,
2107
+ /**
2108
+ * When the active render device changes, vx_evt_audio_device_hot_swap is raised with event_type set to vx_audio_device_hot_swap_event_type_active_render_device_changed.
2109
+ */
2110
+ vx_audio_device_hot_swap_event_type_active_render_device_changed = 1,
2111
+ /**
2112
+ * When the active capture device changes, vx_evt_audio_device_hot_swap is raised with event_type set to vx_audio_device_hot_swap_event_type_active_capture_device_changed.
2113
+ */
2114
+ vx_audio_device_hot_swap_event_type_active_capture_device_changed = 2,
2115
+ /**
2116
+ * @future
2117
+ */
2118
+ vx_audio_device_hot_swap_event_type_audio_device_added = 3,
2119
+ /**
2120
+ * @future
2121
+ */
2122
+ vx_audio_device_hot_swap_event_type_audio_device_removed = 4
2123
+ } vx_audio_device_hot_swap_event_type_t;
2124
+
2125
+ /**
2126
+ * Raised when the publication state has changed.
2127
+ * \ingroup buddy
2128
+ */
2129
+ typedef struct vx_evt_publication_state_changed {
2130
+ /**
2131
+ * The common properties for all events.
2132
+ */
2133
+ vx_evt_base_t base;
2134
+
2135
+ /**
2136
+ * The handle returned from a successful login request.
2137
+ */
2138
+ VX_HANDLE account_handle;
2139
+
2140
+ /**
2141
+ * The alias associated with this publication.
2142
+ */
2143
+ char *alias_username;
2144
+
2145
+ /**
2146
+ * The state of the publication.
2147
+ */
2148
+ vx_publication_state_change_state state;
2149
+
2150
+ /**
2151
+ * The presence code.
2152
+ * The following list details possible values:
2153
+ * - 0 - buddy_presence_offline
2154
+ * - 2 - buddy_presence_online
2155
+ * - 3 - buddy_presence_busy
2156
+ * - 4 - buddy_presence_brb
2157
+ * - 5 - buddy_presence_away
2158
+ * - 6 - buddy_presence_onthephone
2159
+ * - 7 - buddy_presence_outtolunch
2160
+ */
2161
+ vx_buddy_presence_state presence;
2162
+
2163
+ /**
2164
+ * A custom message string when presence is set.
2165
+ */
2166
+ char *custom_message;
2167
+
2168
+ /**
2169
+ * Code used to identify why a state change has been made.
2170
+ */
2171
+ int status_code;
2172
+
2173
+ /**
2174
+ * Text (in English) used to describe the status code.
2175
+ */
2176
+ char *status_string;
2177
+ } vx_evt_publication_state_changed_t;
2178
+
2179
+ /**
2180
+ * Raised when audio device changes are made that impact the audio capture or rendering experience, or when other audio devices are added or removed.
2181
+ */
2182
+ typedef struct vx_evt_audio_device_hot_swap {
2183
+ /**
2184
+ * The common properties for all events.
2185
+ */
2186
+ vx_evt_base_t base;
2187
+
2188
+ /**
2189
+ * The type of hot swap event.
2190
+ */
2191
+ vx_audio_device_hot_swap_event_type_t event_type;
2192
+
2193
+ /**
2194
+ * In the case of vx_audio_device_hot_swap_event_type_active_render_device_changed or vx_audio_device_hot_swap_event_type_active_capture_device_changed,
2195
+ * the new active device.
2196
+ */
2197
+ vx_device_t *relevant_device;
2198
+ /**
2199
+ * The account handle of the user whose device was changed as a result of the hot swap event.
2200
+ * If no user is logged in, this field is a null pointer.
2201
+ */
2202
+ VX_HANDLE account_handle;
2203
+ } vx_evt_audio_device_hot_swap_t;
2204
+
2205
+ /**
2206
+ * Raised when a message from another user is received.
2207
+ * \see vx_req_account_send_message
2208
+ * \note V5 only.
2209
+ * \ingroup account
2210
+ */
2211
+ typedef struct vx_evt_user_to_user_message {
2212
+ /**
2213
+ * The common properties for all events.
2214
+ */
2215
+ vx_evt_base_t base;
2216
+
2217
+ /**
2218
+ * The handle returned from a successful account login request.
2219
+ * \see vx_req_account_anonymous_login
2220
+ */
2221
+ VX_HANDLE account_handle;
2222
+
2223
+ /**
2224
+ * The URI of the account sending the message.
2225
+ */
2226
+ char *from_uri;
2227
+
2228
+ /**
2229
+ * The encoded URI for the sending user with the tag.
2230
+ * This uniquely identifies users that might be logged in with the same account name from multiple devices (Multi-Login).
2231
+ */
2232
+ char *encoded_uri_with_tag;
2233
+
2234
+ /**
2235
+ * The content of the message being received, UTF-8 encoded.
2236
+ */
2237
+ char *message_body;
2238
+
2239
+ /**
2240
+ * The id of the message. It is empty unless chat history is enabled.
2241
+ */
2242
+ char *message_id;
2243
+
2244
+ /**
2245
+ * The language (default NULL, implies "en").
2246
+ */
2247
+ char *language;
2248
+
2249
+ /**
2250
+ * The namespace of the custom application stanza (optional, default NULL).
2251
+ */
2252
+ char *application_stanza_namespace;
2253
+
2254
+ /**
2255
+ * The custom application stanza body (optional, default NULL).
2256
+ */
2257
+ char *application_stanza_body;
2258
+
2259
+ /**
2260
+ * The displayname, if the from_uri had a displayname.
2261
+ */
2262
+ char *from_displayname;
2263
+ } vx_evt_user_to_user_message_t;
2264
+ #ifndef DOXYGEN_MAM_SKIP
2265
+ /**
2266
+ * Presented when a message is found in response to %vx_req_account_archive_query or %vx_req_account_chat_history_query request.
2267
+ * This event is triggered for every message found.
2268
+ * \ingroup account
2269
+ */
2270
+ typedef struct vx_evt_account_archive_message {
2271
+ /**
2272
+ * The common properties for all events.
2273
+ */
2274
+ vx_evt_base_t base;
2275
+
2276
+ /**
2277
+ * The handle returned from a successful account login request.
2278
+ * \see vx_req_account_anonymous_login
2279
+ */
2280
+ VX_HANDLE account_handle;
2281
+
2282
+ /**
2283
+ * The ID of the query in progress.
2284
+ * This ID is returned for a successfully started query in a vx_resp_account_archive_query or vx_resp_account_chat_history_query response.
2285
+ */
2286
+ char *query_id;
2287
+
2288
+ /**
2289
+ * The time stamp of the message in the format specified in XEP-0082.
2290
+ */
2291
+ char *time_stamp;
2292
+
2293
+ /**
2294
+ * The URI of the channel that this message was exchanged in.
2295
+ * \note Mutually exclusive with participant_uri.
2296
+ */
2297
+ char *channel_uri;
2298
+
2299
+ /**
2300
+ * The URI of the sender/receiver of the message for inbound/outbound messages, respectively.
2301
+ * \note Mutually exclusive with channel_uri.
2302
+ */
2303
+ char *participant_uri;
2304
+
2305
+ /**
2306
+ * The displayname of the sender/receiver of the message.
2307
+ */
2308
+ char *displayname;
2309
+
2310
+ /**
2311
+ * The message direction: 1 for inbound, and 0 for outbound.
2312
+ */
2313
+ int is_inbound;
2314
+
2315
+ /**
2316
+ * The content of the message, UTF-8 encoded.
2317
+ */
2318
+ char *message_body;
2319
+
2320
+ /**
2321
+ * The server-assigned ID of the message used for paging through large result sets.
2322
+ */
2323
+ char *message_id;
2324
+
2325
+ /**
2326
+ * The encoded URI for the sending user with the tag.
2327
+ * This uniquely identifies users that might be logged in with the same account name from multiple devices (Multi-Login).
2328
+ * \note These users can be joined to a channel from only one device at any given moment of time (no Multi-Join).
2329
+ */
2330
+ char *encoded_uri_with_tag;
2331
+
2332
+ /**
2333
+ * The language (default NULL, implies "en").
2334
+ */
2335
+ char *language;
2336
+ } vx_evt_account_archive_message_t;
2337
+ /**
2338
+ * Presented when an account message archive query is completed.
2339
+ * There is one vx_evt_account_archive_query_end event for every query started with vx_req_account_archive_query request.
2340
+ * \ingroup account
2341
+ */
2342
+ typedef struct vx_evt_account_archive_query_end {
2343
+ /**
2344
+ * The common properties for all events.
2345
+ */
2346
+ vx_evt_base_t base;
2347
+
2348
+ /**
2349
+ * The handle returned from a successful account login request.
2350
+ * \see vx_req_account_anonymous_login
2351
+ */
2352
+ VX_HANDLE account_handle;
2353
+
2354
+ /**
2355
+ * The ID of the query in progress.
2356
+ * This ID is returned for a successfully started query in a vx_resp_account_archive_query response.
2357
+ */
2358
+ char *query_id;
2359
+
2360
+ /**
2361
+ * The query result code.
2362
+ * This is similar to a response result_code.
2363
+ */
2364
+ int return_code;
2365
+
2366
+ /**
2367
+ * The query status code.
2368
+ * This is similar to a response status_code.
2369
+ */
2370
+ int status_code;
2371
+
2372
+ /**
2373
+ * The first returned message ID.
2374
+ * This ID can be used for paging.
2375
+ */
2376
+ char *first_id;
2377
+
2378
+ /**
2379
+ * The last returned message ID.
2380
+ * This ID can be used for paging.
2381
+ */
2382
+ char *last_id;
2383
+
2384
+ /**
2385
+ * The index of the first matching message reported with a vx_evt_account_archive_message event.
2386
+ */
2387
+ unsigned int first_index;
2388
+
2389
+ /**
2390
+ * The total number of messages matching the criteria specified in the %vx_req_account_archive_query request.
2391
+ * This is the total size of the result set.
2392
+ */
2393
+ unsigned int count;
2394
+ /**
2395
+ * A cursor pointing to the next page of results for pagination. The cursor is returned as a timestamp in ISO format.
2396
+ */
2397
+ char *next_cursor;
2398
+ } vx_evt_account_archive_query_end_t;
2399
+ #endif
2400
+ /**
2401
+ * Raised when a server reports a directed message send failure.
2402
+ * \see vx_req_account_send_message
2403
+ * \note V5 only.
2404
+ * \ingroup account
2405
+ */
2406
+ typedef struct vx_evt_account_send_message_failed {
2407
+ /**
2408
+ * The common properties for all events.
2409
+ */
2410
+ vx_evt_base_t base;
2411
+
2412
+ /**
2413
+ * The handle returned from a successful account login request.
2414
+ * \see vx_req_account_anonymous_login
2415
+ */
2416
+ VX_HANDLE account_handle;
2417
+
2418
+ /**
2419
+ * The ID of the query in progress.
2420
+ * This ID is returned for a successfully started query in a vx_resp_account_send_message response.
2421
+ * \see vx_resp_account_send_message
2422
+ */
2423
+ char *request_id;
2424
+
2425
+ /**
2426
+ * The status code.
2427
+ * This is similar to a response status_code.
2428
+ */
2429
+ int status_code;
2430
+ } vx_evt_account_send_message_failed_t;
2431
+
2432
+ /**
2433
+ * Raised when a text-to-speech (TTS) message injection has started.
2434
+ * \note V5 only.
2435
+ * \ingroup texttospeech
2436
+ */
2437
+ typedef struct vx_evt_tts_injection_started {
2438
+ /**
2439
+ * The common properties for all events.
2440
+ */
2441
+ vx_evt_base_t base;
2442
+
2443
+ /**
2444
+ * The number of consumers (active sessions and/or local playback players) to which the message is about to get injected to.
2445
+ */
2446
+ unsigned int num_consumers;
2447
+
2448
+ /**
2449
+ * The ID of the utterance that this event relates to.
2450
+ */
2451
+ vx_tts_utterance_id utterance_id;
2452
+
2453
+ /**
2454
+ * The duration in seconds of the utterance.
2455
+ */
2456
+ double utterance_duration;
2457
+
2458
+ /**
2459
+ * The destination to which the utterance was injected to.
2460
+ */
2461
+ vx_tts_destination tts_destination;
2462
+ } vx_evt_tts_injection_started_t;
2463
+
2464
+
2465
+ /**
2466
+ * Raised when an injection of a text-to-speech (TTS) message has ended.
2467
+ * \note V5 only.
2468
+ * \ingroup texttospeech
2469
+ */
2470
+ typedef struct vx_evt_tts_injection_ended {
2471
+ /**
2472
+ * The common properties for all events.
2473
+ */
2474
+ vx_evt_base_t base;
2475
+
2476
+ /**
2477
+ * The number of consumers (active sessions and/or local playback players) to which the message was injected to.
2478
+ */
2479
+ unsigned int num_consumers;
2480
+
2481
+ /**
2482
+ * The ID of the utterance that this event relates to.
2483
+ */
2484
+ vx_tts_utterance_id utterance_id;
2485
+
2486
+ /**
2487
+ * The destination to which the utterance was injected to.
2488
+ */
2489
+ vx_tts_destination tts_destination;
2490
+ } vx_evt_tts_injection_ended_t;
2491
+
2492
+ /**
2493
+ * Raised when an injection of a text-to-speech (TTS) message has failed.
2494
+ * \note V5 only.
2495
+ * \ingroup texttospeech
2496
+ */
2497
+ typedef struct vx_evt_tts_injection_failed {
2498
+ /**
2499
+ * The common properties for all events.
2500
+ */
2501
+ vx_evt_base_t base;
2502
+
2503
+ /**
2504
+ * The failed injection's resultant error code.
2505
+ */
2506
+ vx_tts_status status;
2507
+
2508
+ /**
2509
+ * The ID of the utterance that this event relates to.
2510
+ */
2511
+ vx_tts_utterance_id utterance_id;
2512
+
2513
+ /**
2514
+ * The destination to which the utterance was injected to.
2515
+ */
2516
+ vx_tts_destination tts_destination;
2517
+ } vx_evt_tts_injection_failed_t;
2518
+
2519
+ /**
2520
+ * Raised when the transcription (STT) service has a failure.
2521
+ * \note V5 only.
2522
+ * \ingroup speechtotext
2523
+ */
2524
+ typedef struct vx_evt_stt_failed
2525
+ {
2526
+ /**
2527
+ * The common properties for all events.
2528
+ */
2529
+ vx_evt_base_t base;
2530
+
2531
+ /**
2532
+ * The handle returned from a successful session group create request.
2533
+ * \see vx_req_sessiongroup_create
2534
+ */
2535
+ VX_HANDLE sessiongroup_handle;
2536
+
2537
+ /**
2538
+ * The handle returned from a successful session add request.
2539
+ * \see vx_req_sessiongroup_add_session
2540
+ */
2541
+ VX_HANDLE session_handle;
2542
+
2543
+ /**
2544
+ * The transcription failure error code.
2545
+ */
2546
+ int status_code;
2547
+
2548
+ /**
2549
+ * Text (in English) used to describe the status code.
2550
+ */
2551
+ char *status_string;
2552
+ } vx_evt_stt_failed_t;
2553
+
2554
+ /**
2555
+ * Raised when the network connection state has changed
2556
+ * \ingroup network
2557
+ */
2558
+
2559
+ typedef struct vx_evt_connection_state_changed {
2560
+ /**
2561
+ * The common properties for all events.
2562
+ */
2563
+ vx_evt_base_t base;
2564
+
2565
+ /**
2566
+ * The network connection state reported.
2567
+ */
2568
+ vx_connection_state connection_state;
2569
+
2570
+ /**
2571
+ * The handle returned from a successful account request.
2572
+ */
2573
+ VX_HANDLE account_handle;
2574
+ } vx_evt_connection_state_changed_t;
2575
+
2576
+ /**
2577
+ * Raised when presence status of the signed in user changes
2578
+ */
2579
+ typedef struct vx_evt_presence_updated {
2580
+ /**
2581
+ * The common properties for all events.
2582
+ */
2583
+ vx_evt_base_t base;
2584
+
2585
+ /**
2586
+ * The new online presence state of the user represented by sender_uri
2587
+ */
2588
+ vx_presence_state presence;
2589
+
2590
+ /**
2591
+ * The URI of the user who's presence has changed.
2592
+ */
2593
+ char *sender_uri;
2594
+ } vx_evt_presence_updated_t;
2595
+
2596
+ /**
2597
+ * Free any event of any type.
2598
+ * \ingroup memorymanagement
2599
+ */
2600
+ #ifndef VIVOX_TYPES_ONLY
2601
+ VIVOXSDK_DLLEXPORT int destroy_evt(vx_evt_base_t *pCmd);
2602
+ #endif
2603
+
2604
+ #ifdef __cplusplus
2605
+ }
2606
+ #endif
2607
+
2608
+ #pragma pack(pop)