Commit 1bc38feb authored by Tristan Matthews's avatar Tristan Matthews

Merge branch 'no_globals_in_calltree_experiment' of...

Merge branch 'no_globals_in_calltree_experiment' of git+ssh://git.sflphone.org/var/repos/sflphone/git/sflphone into no_globals_in_calltree_experiment
parents 32281ec8 f0cb0735
......@@ -313,6 +313,24 @@
</arg>
</method>
<method name="getConferenceId" tp:name-for-bindings="getConferenceId">
<tp:added version="1.1.0"/>
<tp:docstring>
If thsi call participate to a conference, return the conference id.
Return an empty string elsewhere.
</tp:docstring>
<arg type="s" name="callID" direction="in">
<tp:docstring>
The call id.
</tp:docstring>
</arg>
<arg type="s" name="confID" direction="out">
<tp:docstring>
A string containing the conference ID, or an empty string.
</tp:docstring>
</arg>
</method>
<method name="setRecording" tp:name-for-bindings="setRecording">
<tp:docstring>
Start recording a call.
......
......@@ -232,6 +232,12 @@ CallManager::getParticipantList(const std::string& confID)
return Manager::instance().getParticipantList(confID);
}
std::string
CallManager::getConferenceId(const std::string& callID)
{
return Manager::instance().getConferenceId(callID);
}
bool
CallManager::startRecordedFilePlayback(const std::string& filepath)
{
......
......@@ -99,6 +99,7 @@ class CallManager
void unholdConference(const std::string& confID);
std::vector< std::string > getConferenceList();
std::vector< std::string > getParticipantList(const std::string& confID);
std::string getConferenceId(const std::string& callID);
std::map< std::string, std::string > getConferenceDetails(const std::string& callID);
/* File Playback methods */
......
......@@ -2853,6 +2853,20 @@ std::vector<std::string> ManagerImpl::getParticipantList(const std::string& conf
return v;
}
std::string ManagerImpl::getConferenceId(const std::string& callID)
{
std::string account_id = getAccountFromCall(callID);
Call *call = getAccountLink(account_id)->getCall(callID);
if(call == NULL) {
ERROR("Get conference id");
return "";
}
std::string confID = call->getConfId();
return confID;
}
void ManagerImpl::saveHistory()
{
if (!history_.save())
......
......@@ -458,6 +458,8 @@ class ManagerImpl {
*/
std::vector<std::string> getParticipantList(const std::string& confID) const;
std::string getConferenceId(const std::string& callID);
/**
* Save the details of an existing account, given the account ID
* This will load the configuration map with the given data.
......
......@@ -313,6 +313,24 @@
</arg>
</method>
<method name="getConferenceId" tp:name-for-bindings="getConferenceId">
<tp:added version="1.1.0"/>
<tp:docstring>
If thsi call participate to a conference, return the conference id.
Return an empty string elsewhere.
</tp:docstring>
<arg type="s" name="callID" direction="in">
<tp:docstring>
The call id.
</tp:docstring>
</arg>
<arg type="s" name="confID" direction="out">
<tp:docstring>
A string containing the conference ID, or an empty string.
</tp:docstring>
</arg>
</method>
<method name="setRecording" tp:name-for-bindings="setRecording">
<tp:docstring>
Start recording a call.
......
......@@ -1723,6 +1723,16 @@ dbus_get_participant_list(const gchar *confID)
return list;
}
gchar *
dbus_get_conference_id(const gchar *callID)
{
gchar *confID = NULL;
GError *error = NULL;
org_sflphone_SFLphone_CallManager_get_conference_id(config_proxy, callID, &confID, &error);
check_error(error);
return confID;
}
GHashTable *
dbus_get_conference_details(const gchar *confID)
{
......
......@@ -388,6 +388,12 @@ void dbus_add_participant(const gchar *callID, const gchar *confID);
*/
gchar **dbus_get_participant_list(const gchar *confID);
/**
* If thsi call participate to a conference, return the conference id
* Return an empty string elsewhere
*/
gchar *dbus_get_conference_id(const gchar *callID);
/**
* Toggle recording for this instance, may be call or conference
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment