summaryrefslogtreecommitdiff
path: root/toxav/msi.h
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2015-03-01 18:45:04 +0100
committermannol <eniz_vukovic@hotmail.com>2015-03-01 18:45:04 +0100
commit45e8807c1e693c105b97784d15b7eb19bcc87918 (patch)
treec75497dcacf65552c3fc3cbb0cacf759b7fe5c67 /toxav/msi.h
parent9e65cd533735f1acc638241ed58400bf7029b1ef (diff)
Make toxav thread safe
Diffstat (limited to 'toxav/msi.h')
-rw-r--r--toxav/msi.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/toxav/msi.h b/toxav/msi.h
index b846542d..8404df19 100644
--- a/toxav/msi.h
+++ b/toxav/msi.h
@@ -35,14 +35,14 @@
35 * Error codes. 35 * Error codes.
36 */ 36 */
37typedef enum { 37typedef enum {
38 msi_ErrorNone, 38 msi_ENone,
39 msi_InvalidMessage, 39 msi_EInvalidMessage,
40 msi_InvalidParam, 40 msi_EInvalidParam,
41 msi_InvalidState, 41 msi_EInvalidState,
42 msi_StrayMessage, 42 msi_EStrayMessage,
43 msi_SystemError, 43 msi_ESystem,
44 msi_HandleError, 44 msi_EHandle,
45 msi_ErrUndisclosed, /* NOTE: must be last enum otherwise parsing wont work */ 45 msi_EUndisclosed, /* NOTE: must be last enum otherwise parsing wont work */
46} MSIError; 46} MSIError;
47 47
48/** 48/**
@@ -118,6 +118,9 @@ typedef struct MSISession_s {
118 void *av; 118 void *av;
119 Messenger *messenger; 119 Messenger *messenger;
120 120
121 /* The mutex controls async access from control
122 * thread(s) and core thread.
123 */
121 pthread_mutex_t mutex[1]; 124 pthread_mutex_t mutex[1];
122 MSICallbackType callbacks[7]; 125 MSICallbackType callbacks[7];
123} MSISession; 126} MSISession;