diff --git a/test/agent/src/bindings/account.h b/test/agent/src/bindings/account.h index a5dd054ea384061e2aa0a108ddfac31ce4611c9b..f057dc256b68034286728e9d2c669f704435a24e 100644 --- a/test/agent/src/bindings/account.h +++ b/test/agent/src/bindings/account.h @@ -29,44 +29,54 @@ static SCM set_details_binding(SCM accountID_str, SCM details_alist) { - DRing::setAccountDetails(from_guile(accountID_str), - from_guile(details_alist)); - return SCM_UNDEFINED; + LOG_BINDING(); + + DRing::setAccountDetails(from_guile(accountID_str), + from_guile(details_alist)); + return SCM_UNDEFINED; } static SCM get_details_binding(SCM accountID_str) { - return to_guile(DRing::getAccountDetails(from_guile(accountID_str))); + LOG_BINDING(); + + return to_guile(DRing::getAccountDetails(from_guile(accountID_str))); } static SCM send_register_binding(SCM accountID_str, SCM enable_boolean) { - DRing::sendRegister(from_guile(accountID_str), - from_guile(enable_boolean)); + LOG_BINDING(); + + DRing::sendRegister(from_guile(accountID_str), + from_guile(enable_boolean)); - return SCM_UNDEFINED; + return SCM_UNDEFINED; } static SCM export_to_file_binding(SCM accountID_str, SCM path_str, SCM passwd_str_optional) { - if (SCM_UNBNDP(passwd_str_optional)) { - return to_guile(DRing::exportToFile(from_guile(accountID_str), - from_guile(path_str))); - } + LOG_BINDING(); + if (SCM_UNBNDP(passwd_str_optional)) { return to_guile(DRing::exportToFile(from_guile(accountID_str), - from_guile(path_str), - from_guile(passwd_str_optional))); + from_guile(path_str))); + } + + return to_guile(DRing::exportToFile(from_guile(accountID_str), + from_guile(path_str), + from_guile(passwd_str_optional))); } static SCM add_account_binding(SCM details_alist, SCM accountID_str_optional) { - if (SCM_UNBNDP(accountID_str_optional)) { - return to_guile(DRing::addAccount(from_guile(details_alist))); - } + LOG_BINDING(); + + if (SCM_UNBNDP(accountID_str_optional)) { + return to_guile(DRing::addAccount(from_guile(details_alist))); + } - return to_guile(DRing::addAccount(from_guile(details_alist), - from_guile(accountID_str_optional))); + return to_guile(DRing::addAccount(from_guile(details_alist), + from_guile(accountID_str_optional))); } static void diff --git a/test/agent/src/bindings/bindings.h b/test/agent/src/bindings/bindings.h index 2ac76e1f319cc0ddce8e317d61a03de45a578ad3..19b8c96b5c0ac6e076b1d09d858ff9140f42116e 100644 --- a/test/agent/src/bindings/bindings.h +++ b/test/agent/src/bindings/bindings.h @@ -36,5 +36,7 @@ #define DEFINE_UINT(NAME) DEFINE_AND_EXPORT(#NAME, NAME, scm_from_uint) #define DEFINE_UINT32(NAME) DEFINE_AND_EXPORT(#NAME, NAME, scm_from_uint32) +#define LOG_BINDING() JAMI_INFO("[GUILE] In binding %s()", __func__) + extern void define_primitive(const char* name, int req, int opt, int rst, void* func); extern void install_scheme_primitives(); diff --git a/test/agent/src/bindings/call.h b/test/agent/src/bindings/call.h index ea2dca8e6611f2589a3f357afd5ac50633f6c383..6322a71c8b092adcc426563acc00fff6c6910e5c 100644 --- a/test/agent/src/bindings/call.h +++ b/test/agent/src/bindings/call.h @@ -30,6 +30,8 @@ static SCM place_call_binding(SCM accountID_str, SCM contact_str, SCM call_details_alist_optional) { + LOG_BINDING(); + if (SCM_UNBNDP(call_details_alist_optional)) { return to_guile(DRing::placeCall(from_guile(accountID_str), from_guile(contact_str))); @@ -43,6 +45,8 @@ place_call_binding(SCM accountID_str, SCM contact_str, SCM call_details_alist_op static SCM place_call_with_media_binding(SCM accountID_str, SCM contact_str, SCM call_media_vector_alist_optional) { + LOG_BINDING(); + if (SCM_UNBNDP(call_media_vector_alist_optional)) { call_media_vector_alist_optional = scm_c_make_vector(0, SCM_UNDEFINED); } @@ -55,12 +59,16 @@ place_call_with_media_binding(SCM accountID_str, SCM contact_str, SCM call_media static SCM hang_up_binding(SCM callID_str) { + LOG_BINDING(); + return to_guile(DRing::hangUp(from_guile(callID_str))); } static SCM accept_binding(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))); } @@ -72,18 +80,24 @@ accept_binding(SCM callID_str, SCM call_media_vector_alist_optional) static SCM refuse_binding(SCM callID_str) { + LOG_BINDING(); + return to_guile(DRing::refuse(from_guile(callID_str))); } static SCM hold_binding(SCM callID_str) { + LOG_BINDING(); + return to_guile(DRing::hold(from_guile(callID_str))); } static SCM unhold_binding(SCM callID_str) { + LOG_BINDING(); + return to_guile(DRing::unhold(from_guile(callID_str))); }