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
8468af34
Commit
8468af34
authored
3 years ago
by
Olivier Dion
Browse files
Options
Downloads
Patches
Plain Diff
agent: Add get-details
Change-Id: I7de1fb513238707930d500472bb6d8b2139aba2a
parent
43c4c185
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/agent/agent.cpp
+8
-0
8 additions, 0 deletions
test/agent/agent.cpp
test/agent/agent.h
+1
-0
1 addition, 0 deletions
test/agent/agent.h
test/agent/bindings.cpp
+7
-0
7 additions, 0 deletions
test/agent/bindings.cpp
with
16 additions
and
0 deletions
test/agent/agent.cpp
+
8
−
0
View file @
8468af34
...
...
@@ -228,6 +228,12 @@ Agent::setDetails(const std::map<std::string, std::string>& details)
DRing
::
setAccountDetails
(
accountID_
,
details
);
}
std
::
map
<
std
::
string
,
std
::
string
>
Agent
::
getDetails
()
const
{
return
DRing
::
getAccountDetails
(
accountID_
);
}
void
Agent
::
activate
(
bool
enable
)
{
...
...
@@ -485,6 +491,8 @@ Agent::registerStaticCallbacks()
void
Agent
::
waitForAnnouncement
(
std
::
chrono
::
seconds
timeout
)
{
LOG_AGENT_STATE
();
std
::
condition_variable
cv
;
std
::
mutex
mtx
;
...
...
This diff is collapsed.
Click to expand it.
test/agent/agent.h
+
1
−
0
View file @
8468af34
...
...
@@ -112,6 +112,7 @@ public:
std
::
string
someContact
()
const
;
std
::
string
someConversation
()
const
;
void
setDetails
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
details
);
std
::
map
<
std
::
string
,
std
::
string
>
getDetails
()
const
;
void
stopRecording
(
const
std
::
string
&
context
);
void
startRecording
(
const
std
::
string
&
context
,
const
std
::
string
&
to
);
void
searchForPeers
(
std
::
vector
<
std
::
string
>&
peers
);
...
...
This diff is collapsed.
Click to expand it.
test/agent/bindings.cpp
+
7
−
0
View file @
8468af34
...
...
@@ -216,6 +216,12 @@ set_details_binding(SCM details_alist)
return
SCM_UNDEFINED
;
}
static
SCM
get_details_binding
()
{
return
to_guile
(
Agent
::
instance
().
getDetails
());
}
static
SCM
ensure_account_binding
()
{
...
...
@@ -296,6 +302,7 @@ install_scheme_primitives()
define_primitive
(
"agent:wait"
,
0
,
1
,
0
,
(
void
*
)
wait_binding
);
define_primitive
(
"agent:ping"
,
1
,
0
,
0
,
(
void
*
)
ping_binding
);
define_primitive
(
"agent:set-details"
,
1
,
0
,
0
,
(
void
*
)
set_details_binding
);
define_primitive
(
"agent:get-details"
,
0
,
0
,
0
,
(
void
*
)
get_details_binding
);
define_primitive
(
"agent:ensure-account"
,
0
,
0
,
0
,
(
void
*
)
ensure_account_binding
);
define_primitive
(
"agent->archive"
,
1
,
0
,
0
,
(
void
*
)
export_to_archive_binding
);
define_primitive
(
"archive->agent"
,
1
,
0
,
0
,
(
void
*
)
import_from_archive_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