Commit b0e18e2a authored by Tristan Matthews's avatar Tristan Matthews Committed by Guillaume Roguez

daemon: remove getRingtoneList()

Note: gnome client is stubbed but this client code is deprecated.

Refs #59255
Refs #65652

Change-Id: I8aff174c317948e47316d636458f19d265456808
parent 59d38c8c
......@@ -464,16 +464,6 @@
</arg>
</method>
<method name="getRingtoneList" tp:name-for-bindings="getRingtoneList">
<tp:added version="1.1.1"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MapStringString"/>
<tp:docstring>
Get a map [Path,Filename] of available ringtone. Note, set the ringtone with the complete path
</tp:docstring>
<arg type="a{ss}" name="list" direction="out">
</arg>
</method>
<!-- General Settings Panel -->
<method name="getNoiseSuppressState" tp:name-for-bindings="getNoiseSuppressState">
......
......@@ -222,11 +222,6 @@ void DBusConfigurationManager::mutePlayback(const bool& mute)
ring_config_mute_playback(mute);
}
std::map<std::string, std::string> DBusConfigurationManager::getRingtoneList()
{
return ring_config_get_ringtone_list();
}
std::string DBusConfigurationManager::getAudioManager()
{
return ring_config_get_audio_manager();
......
......@@ -368,35 +368,6 @@ void ConfigurationManager::setAgcState(bool enabled)
Manager::instance().setAGCState(enabled);
}
std::map<std::string, std::string> ConfigurationManager::getRingtoneList()
{
std::map<std::string, std::string> ringToneList;
std::string r_path(fileutils::get_ringtone_dir());
struct dirent **namelist;
int n = scandir(r_path.c_str(), &namelist, 0, alphasort);
if (n == -1) {
RING_ERR("%s", strerror(errno));
return ringToneList;
}
while (n--) {
if (strcmp(namelist[n]->d_name, ".") and strcmp(namelist[n]->d_name, "..")) {
std::string file(namelist[n]->d_name);
if (file.find(".wav") != std::string::npos)
file.replace(file.find(".wav"), 4, "");
else
file.replace(file.size() - 3, 3, "");
if (file[0] <= 0x7A and file[0] >= 0x61) file[0] = file[0] - 32;
ringToneList[r_path + namelist[n]->d_name] = file;
}
free(namelist[n]);
}
free(namelist);
return ringToneList;
}
int32_t ConfigurationManager::isIax2Enabled()
{
return HAVE_IAX;
......
......@@ -98,8 +98,6 @@ class ConfigurationManager
bool isPlaybackMuted();
void mutePlayback(bool mute);
std::map<std::string, std::string> getRingtoneList();
std::string getAudioManager();
bool setAudioManager(const std::string& api);
......
......@@ -230,7 +230,6 @@ bool ring_config_is_capture_muted(void);
void ring_config_mute_capture(bool mute);
bool ring_config_is_playback_muted(void);
void ring_config_mute_playback(int mute);
std::map<std::string, std::string> ring_config_get_ringtone_list(void);
std::string ring_config_get_audio_manager(void);
bool ring_config_set_audio_manager(const std::string& api);
std::vector<std::string> ring_config_get_supported_audio_managers(void);
......
......@@ -97,13 +97,6 @@ const char *get_program_dir()
return program_dir;
}
// FIXME: This should use our real DATADIR
std::string
get_ringtone_dir()
{
return std::string(get_program_dir()) + "/../../share/ring/ringtones/";
}
/* Lock a file region */
static int
lockReg(int fd, int cmd, int type, int whence, int start, off_t len)
......
......@@ -55,7 +55,6 @@ namespace ring { namespace fileutils {
bool check_dir(const char *path);
void set_program_dir(char *program_path);
const char *get_program_dir();
std::string get_ringtone_dir();
std::string expand_path(const std::string &path);
bool isDirectoryWritable(const std::string &directory);
......
......@@ -520,11 +520,6 @@ void ring_config_mute_playback(int mute)
getConfigurationManager()->mutePlayback(mute);
}
std::map<std::string, std::string> ring_config_get_ringtone_list(void)
{
return getConfigurationManager()->getRingtoneList();
}
std::string ring_config_get_audio_manager(void)
{
return getConfigurationManager()->getAudioManager();
......
......@@ -445,16 +445,6 @@
</arg>
</method>
<method name="getRingtoneList" tp:name-for-bindings="getRingtoneList">
<tp:added version="1.1.1"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="MapStringString"/>
<tp:docstring>
Get a map [Path,Filename] of available ringtone. Note, set the ringtone with the complete path
</tp:docstring>
<arg type="a{ss}" name="list" direction="out">
</arg>
</method>
<!-- General Settings Panel -->
<method name="getNoiseSuppressState" tp:name-for-bindings="getNoiseSuppressState">
......
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