mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
agent: Add get-details
Change-Id: I7de1fb513238707930d500472bb6d8b2139aba2a
This commit is contained in:
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user