Skip to content
Snippets Groups Projects
Commit 5e6b8823 authored by Olivier Dion's avatar Olivier Dion
Browse files

agent/bindings: Bump bindings to new API for calls, conferences

Change-Id: I759ebe5f1827c27468f0d60e91098c70257c7b30
parent 24d9284d
Branches
Tags
No related merge requests found
......@@ -57,48 +57,54 @@ place_call_with_media_binding(SCM accountID_str, SCM contact_str, SCM call_media
}
static SCM
hang_up_binding(SCM callID_str)
hang_up_binding(SCM accountID_str, SCM callID_str)
{
LOG_BINDING();
return to_guile(DRing::hangUp(from_guile(callID_str)));
return to_guile(DRing::hangUp(from_guile(accountID_str),
from_guile(callID_str)));
}
static SCM
accept_binding(SCM callID_str, SCM call_media_vector_alist_optional)
accept_binding(SCM accountID_str, SCM callID_str, SCM call_media_vector_alist_optional)
{
LOG_BINDING();
if (SCM_UNBNDP(call_media_vector_alist_optional)) {
return to_guile(DRing::accept(from_guile(callID_str)));
return to_guile(DRing::accept(from_guile(accountID_str),
from_guile(callID_str)));
}
return to_guile(DRing::acceptWithMedia(from_guile(callID_str),
return to_guile(DRing::acceptWithMedia(from_guile(accountID_str),
from_guile(callID_str),
from_guile(call_media_vector_alist_optional)));
}
static SCM
refuse_binding(SCM callID_str)
refuse_binding(SCM accountID_str, SCM callID_str)
{
LOG_BINDING();
return to_guile(DRing::refuse(from_guile(callID_str)));
return to_guile(DRing::refuse(from_guile(accountID_str),
from_guile(callID_str)));
}
static SCM
hold_binding(SCM callID_str)
hold_binding(SCM accountID_str, SCM callID_str)
{
LOG_BINDING();
return to_guile(DRing::hold(from_guile(callID_str)));
return to_guile(DRing::hold(from_guile(accountID_str),
from_guile(callID_str)));
}
static SCM
unhold_binding(SCM callID_str)
unhold_binding(SCM accountID_str, SCM callID_str)
{
LOG_BINDING();
return to_guile(DRing::unhold(from_guile(callID_str)));
return to_guile(DRing::unhold(from_guile(accountID_str),
from_guile(callID_str)));
}
static void
......@@ -106,9 +112,9 @@ install_call_primitives(void *)
{
define_primitive("place-call", 2, 1, 0, (void*) place_call_binding);
define_primitive("place-call/media", 2, 1, 0, (void*) place_call_with_media_binding);
define_primitive("hang-up", 1, 0, 0, (void*) hang_up_binding);
define_primitive("accept", 1, 1, 0, (void*) accept_binding);
define_primitive("refuse", 1, 0, 0, (void*) refuse_binding);
define_primitive("hold", 1, 0, 0, (void*) hold_binding);
define_primitive("unhold", 1, 0, 0, (void*) unhold_binding);
define_primitive("hang-up", 2, 0, 0, (void*) hang_up_binding);
define_primitive("accept", 2, 1, 0, (void*) accept_binding);
define_primitive("refuse", 2, 0, 0, (void*) refuse_binding);
define_primitive("hold", 2, 0, 0, (void*) hold_binding);
define_primitive("unhold", 2, 0, 0, (void*) unhold_binding);
}
......@@ -206,17 +206,20 @@ install_signal_primitives(void*)
add_handler<DRing::CallSignal::RecordPlaybackFilepath, const std::string&, const std::string&>(
handlers, "record-playback-filepath");
add_handler<DRing::CallSignal::ConferenceCreated, const std::string&>(handlers,
"conference-created");
add_handler<DRing::CallSignal::ConferenceCreated,
const std::string&, const std::string&>(handlers,
"conference-created");
add_handler<DRing::CallSignal::ConferenceChanged, const std::string&, const std::string&>(
handlers, "conference-changed");
add_handler<DRing::CallSignal::ConferenceChanged,
const std::string&, const std::string&, const std::string&>(
handlers, "conference-changed");
add_handler<DRing::CallSignal::UpdatePlaybackScale, const std::string&, unsigned, unsigned>(
handlers, "update-playback-scale");
add_handler<DRing::CallSignal::ConferenceRemoved, const std::string&>(handlers,
"conference-removed");
add_handler<DRing::CallSignal::ConferenceRemoved,
const std::string&, const std::string&>(handlers,
"conference-removed");
add_handler<DRing::CallSignal::RecordingStateChanged, const std::string&, int>(
handlers, "recording-state-changed");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment