* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
-#include <telepathy-glib/account-channel-request.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-farstream/telepathy-farstream.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy-gtk/empathy-call-utils.h>
{
empathy_call_handler_start_tpfs (handler);
- if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) ==
- TP_CALL_STATE_INITIALISED)
- tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL);
+ if (tp_channel_get_requested (TP_CHANNEL (priv->call)))
+ {
+ /* accept outgoing channels immediately */
+ tp_call_channel_accept_async (priv->call,
+ on_call_accepted_cb, NULL);
+ }
else
- priv->accept_when_initialised = TRUE;
+ {
+ /* accepting incoming channels when they are INITIALISED */
+ if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) ==
+ TP_CALL_STATE_INITIALISED)
+ tp_call_channel_accept_async (priv->call,
+ on_call_accepted_cb, NULL);
+ else
+ priv->accept_when_initialised = TRUE;
+ }
return;
}
return priv->video_local_candidate;
}
+
+EmpathyContact *
+empathy_call_handler_get_contact (EmpathyCallHandler *self)
+{
+ return self->priv->contact;
+}