Make Tox AV features optional.

This commit is contained in:
Håvard Pettersson 2015-09-02 22:35:13 +02:00
parent 7b9f8a48fd
commit 8056298e38

View File

@ -21,7 +21,10 @@
#include <weechat/weechat-plugin.h> #include <weechat/weechat-plugin.h>
#include <tox/tox.h> #include <tox/tox.h>
#include <tox/toxav.h>
#ifdef TOXAV_FOUND
#include <tox/toxav.h>
#endif // TOXAV_FOUND
#include "twc.h" #include "twc.h"
#include "twc-list.h" #include "twc-list.h"
@ -75,12 +78,14 @@ twc_group_chat_invite_join(struct t_twc_group_chat_invite *invite)
invite->friend_number, invite->friend_number,
invite->data, invite->data_size); invite->data, invite->data_size);
break; break;
#ifdef TOXAV_ENABLED
case TOX_GROUPCHAT_TYPE_AV: case TOX_GROUPCHAT_TYPE_AV:
rc = toxav_join_av_groupchat(invite->profile->tox, rc = toxav_join_av_groupchat(invite->profile->tox,
invite->friend_number, invite->friend_number,
invite->data, invite->data_size, invite->data, invite->data_size,
NULL, NULL); NULL, NULL);
break; break;
#endif
default: default:
rc = -1; rc = -1;
break; break;