Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
f6a48f89
Commit
f6a48f89
authored
3 years ago
by
Olivier Dion
Committed by
Adrien Béraud
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
agent/bindings/account: Add bindings
Change-Id: Ifc363fee36bd10fba9211cddaa03d6fbd8e99d49
parent
d1829197
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/agent/src/bindings/account.h
+51
-1
51 additions, 1 deletion
test/agent/src/bindings/account.h
with
51 additions
and
1 deletion
test/agent/src/bindings/account.h
+
51
−
1
View file @
f6a48f89
...
...
@@ -23,6 +23,7 @@
/* Jami */
#include
"jami/callmanager_interface.h"
#include
"jami/configurationmanager_interface.h"
#include
"jami/presencemanager_interface.h"
/* Agent */
#include
"utils.h"
...
...
@@ -67,7 +68,8 @@ static SCM export_to_file_binding(SCM accountID_str, SCM path_str, SCM passwd_st
from_guile
(
passwd_str_optional
)));
}
static
SCM
add_account_binding
(
SCM
details_alist
,
SCM
accountID_str_optional
)
static
SCM
add_account_binding
(
SCM
details_alist
,
SCM
accountID_str_optional
)
{
LOG_BINDING
();
...
...
@@ -79,6 +81,50 @@ static SCM add_account_binding(SCM details_alist, SCM accountID_str_optional)
from_guile
(
accountID_str_optional
)));
}
static
SCM
accept_trust_request_binding
(
SCM
accountID_str
,
SCM
from_uri_str
)
{
LOG_BINDING
();
return
to_guile
(
DRing
::
acceptTrustRequest
(
from_guile
(
accountID_str
),
from_guile
(
from_uri_str
)));
}
static
SCM
send_trust_request_binding
(
SCM
accountID_str
,
SCM
to_uri_str
,
SCM
payload_vector_uint8_optional
)
{
LOG_BINDING
();
if
(
SCM_UNBNDP
(
payload_vector_uint8_optional
))
{
payload_vector_uint8_optional
=
scm_c_make_vector
(
0
,
SCM_UNDEFINED
);
}
DRing
::
sendTrustRequest
(
from_guile
(
accountID_str
),
from_guile
(
to_uri_str
),
from_guile
(
payload_vector_uint8_optional
));
return
SCM_UNDEFINED
;
}
static
SCM
get_contacts_binding
(
SCM
accountID_str
)
{
LOG_BINDING
();
return
to_guile
(
DRing
::
getContacts
(
from_guile
(
accountID_str
)));
}
static
SCM
subscribe_buddy_binding
(
SCM
accountID_str
,
SCM
peer_uri_str
,
SCM
flag_bool
)
{
LOG_BINDING
();
DRing
::
subscribeBuddy
(
from_guile
(
accountID_str
),
from_guile
(
peer_uri_str
),
from_guile
(
flag_bool
));
return
SCM_UNDEFINED
;
}
static
void
install_account_primitives
(
void
*
)
{
...
...
@@ -87,4 +133,8 @@ install_account_primitives(void *)
define_primitive
(
"send-register"
,
2
,
0
,
0
,
(
void
*
)
send_register_binding
);
define_primitive
(
"account->archive"
,
2
,
1
,
0
,
(
void
*
)
export_to_file_binding
);
define_primitive
(
"add"
,
1
,
1
,
0
,
(
void
*
)
add_account_binding
);
define_primitive
(
"accept-trust-request"
,
2
,
0
,
0
,
(
void
*
)
accept_trust_request_binding
);
define_primitive
(
"send-trust-request"
,
2
,
1
,
0
,
(
void
*
)
send_trust_request_binding
);
define_primitive
(
"get-contacts"
,
1
,
0
,
0
,
(
void
*
)
get_contacts_binding
);
define_primitive
(
"subscribe-buddy"
,
3
,
0
,
0
,
(
void
*
)
subscribe_buddy_binding
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment