dbuscallmanager.cpp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. /*
  2. * Copyright (C) 2004-2017 Savoir-faire Linux Inc.
  3. *
  4. * Author: Philippe Proulx <philippe.proulx@savoirfairelinux.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #include "dbuscallmanager.h"
  21. #include "dring/callmanager_interface.h"
  22. DBusCallManager::DBusCallManager(DBus::Connection& connection)
  23. : DBus::ObjectAdaptor(connection, "/cx/ring/Ring/CallManager")
  24. {}
  25. auto
  26. DBusCallManager::placeCall(const std::string& accountID, const std::string& to) -> decltype(DRing::placeCall(accountID, to))
  27. {
  28. return DRing::placeCall(accountID, to);
  29. }
  30. auto
  31. DBusCallManager::refuse(const std::string& callID) -> decltype(DRing::refuse(callID))
  32. {
  33. return DRing::refuse(callID);
  34. }
  35. auto
  36. DBusCallManager::accept(const std::string& callID) -> decltype(DRing::accept(callID))
  37. {
  38. return DRing::accept(callID);
  39. }
  40. auto
  41. DBusCallManager::hangUp(const std::string& callID) -> decltype(DRing::hangUp(callID))
  42. {
  43. return DRing::hangUp(callID);
  44. }
  45. auto
  46. DBusCallManager::hold(const std::string& callID) -> decltype(DRing::hold(callID))
  47. {
  48. return DRing::hold(callID);
  49. }
  50. auto
  51. DBusCallManager::unhold(const std::string& callID) -> decltype(DRing::unhold(callID))
  52. {
  53. return DRing::unhold(callID);
  54. }
  55. auto
  56. DBusCallManager::muteLocalMedia(const std::string& callid, const std::string& mediaType, const bool& mute)
  57. -> decltype(DRing::muteLocalMedia(callid, mediaType, mute))
  58. {
  59. return DRing::muteLocalMedia(callid, mediaType, mute);
  60. }
  61. auto
  62. DBusCallManager::transfer(const std::string& callID, const std::string& to) -> decltype(DRing::transfer(callID, to))
  63. {
  64. return DRing::transfer(callID, to);
  65. }
  66. auto
  67. DBusCallManager::attendedTransfer(const std::string& transferID, const std::string& targetID) -> decltype(DRing::attendedTransfer(transferID, targetID))
  68. {
  69. return DRing::attendedTransfer(transferID, targetID);
  70. }
  71. auto
  72. DBusCallManager::getCallDetails(const std::string& callID) -> decltype(DRing::getCallDetails(callID))
  73. {
  74. return DRing::getCallDetails(callID);
  75. }
  76. auto
  77. DBusCallManager::getCallList() -> decltype(DRing::getCallList())
  78. {
  79. return DRing::getCallList();
  80. }
  81. void
  82. DBusCallManager::removeConference(const std::string& conference_id)
  83. {
  84. DRing::removeConference(conference_id);
  85. }
  86. auto
  87. DBusCallManager::joinParticipant(const std::string& sel_callID, const std::string& drag_callID) -> decltype(DRing::joinParticipant(sel_callID, drag_callID))
  88. {
  89. return DRing::joinParticipant(sel_callID, drag_callID);
  90. }
  91. void
  92. DBusCallManager::createConfFromParticipantList(const std::vector< std::string >& participants)
  93. {
  94. DRing::createConfFromParticipantList(participants);
  95. }
  96. auto
  97. DBusCallManager::isConferenceParticipant(const std::string& call_id) -> decltype(DRing::isConferenceParticipant(call_id))
  98. {
  99. return DRing::isConferenceParticipant(call_id);
  100. }
  101. auto
  102. DBusCallManager::addParticipant(const std::string& callID, const std::string& confID) -> decltype(DRing::addParticipant(callID, confID))
  103. {
  104. return DRing::addParticipant(callID, confID);
  105. }
  106. auto
  107. DBusCallManager::addMainParticipant(const std::string& confID) -> decltype(DRing::addMainParticipant(confID))
  108. {
  109. return DRing::addMainParticipant(confID);
  110. }
  111. auto
  112. DBusCallManager::detachLocalParticipant() -> decltype(DRing::detachLocalParticipant())
  113. {
  114. return DRing::detachLocalParticipant();
  115. }
  116. auto
  117. DBusCallManager::detachParticipant(const std::string& callID) -> decltype(DRing::detachParticipant(callID))
  118. {
  119. return DRing::detachParticipant(callID);
  120. }
  121. auto
  122. DBusCallManager::joinConference(const std::string& sel_confID, const std::string& drag_confID) -> decltype(DRing::joinConference(sel_confID, drag_confID))
  123. {
  124. return DRing::joinConference(sel_confID, drag_confID);
  125. }
  126. auto
  127. DBusCallManager::hangUpConference(const std::string& confID) -> decltype(DRing::hangUpConference(confID))
  128. {
  129. return DRing::hangUpConference(confID);
  130. }
  131. auto
  132. DBusCallManager::holdConference(const std::string& confID) -> decltype(DRing::holdConference(confID))
  133. {
  134. return DRing::holdConference(confID);
  135. }
  136. auto
  137. DBusCallManager::unholdConference(const std::string& confID) -> decltype(DRing::unholdConference(confID))
  138. {
  139. return DRing::unholdConference(confID);
  140. }
  141. auto
  142. DBusCallManager::getConferenceList() -> decltype(DRing::getConferenceList())
  143. {
  144. return DRing::getConferenceList();
  145. }
  146. auto
  147. DBusCallManager::getParticipantList(const std::string& confID) -> decltype(DRing::getParticipantList(confID))
  148. {
  149. return DRing::getParticipantList(confID);
  150. }
  151. auto
  152. DBusCallManager::getDisplayNames(const std::string& confID) -> decltype(DRing::getDisplayNames(confID))
  153. {
  154. return DRing::getDisplayNames(confID);
  155. }
  156. auto
  157. DBusCallManager::getConferenceId(const std::string& callID) -> decltype(DRing::getConferenceId(callID))
  158. {
  159. return DRing::getConferenceId(callID);
  160. }
  161. auto
  162. DBusCallManager::getConferenceDetails(const std::string& callID) -> decltype(DRing::getConferenceDetails(callID))
  163. {
  164. return DRing::getConferenceDetails(callID);
  165. }
  166. auto
  167. DBusCallManager::startRecordedFilePlayback(const std::string& filepath) -> decltype(DRing::startRecordedFilePlayback(filepath))
  168. {
  169. return DRing::startRecordedFilePlayback(filepath);
  170. }
  171. void
  172. DBusCallManager::stopRecordedFilePlayback(const std::string& filepath)
  173. {
  174. DRing::stopRecordedFilePlayback(filepath);
  175. }
  176. auto
  177. DBusCallManager::toggleRecording(const std::string& callID) -> decltype(DRing::toggleRecording(callID))
  178. {
  179. return DRing::toggleRecording(callID);
  180. }
  181. void
  182. DBusCallManager::setRecording(const std::string& callID)
  183. {
  184. DRing::setRecording(callID);
  185. }
  186. void
  187. DBusCallManager::recordPlaybackSeek(const double& value)
  188. {
  189. DRing::recordPlaybackSeek(value);
  190. }
  191. auto
  192. DBusCallManager::getIsRecording(const std::string& callID) -> decltype(DRing::getIsRecording(callID))
  193. {
  194. return DRing::getIsRecording(callID);
  195. }
  196. void
  197. DBusCallManager::switchInput(const std::string& callID, const std::string& input)
  198. {
  199. DRing::switchInput(callID, input);
  200. }
  201. auto
  202. DBusCallManager::getCurrentAudioCodecName(const std::string& callID) -> decltype(DRing::getCurrentAudioCodecName(callID))
  203. {
  204. return DRing::getCurrentAudioCodecName(callID);
  205. }
  206. void
  207. DBusCallManager::playDTMF(const std::string& key)
  208. {
  209. DRing::playDTMF(key);
  210. }
  211. void
  212. DBusCallManager::startTone(const int32_t& start, const int32_t& type)
  213. {
  214. DRing::startTone(start, type);
  215. }
  216. void
  217. DBusCallManager::sendTextMessage(const std::string& callID, const std::map<std::string, std::string>& messages, const bool& isMixed)
  218. {
  219. DRing::sendTextMessage(callID, messages, "Me", isMixed);
  220. }
  221. void
  222. DBusCallManager::startSmartInfo(const uint32_t& refreshTimeMs)
  223. {
  224. DRing::startSmartInfo(refreshTimeMs);
  225. }
  226. void
  227. DBusCallManager::stopSmartInfo()
  228. {
  229. DRing::stopSmartInfo();
  230. }