From b2474a958220ee6e78b5190c5735124f2bf160fd Mon Sep 17 00:00:00 2001
From: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
Date: Wed, 29 Aug 2007 11:57:05 -0400
Subject: [PATCH] Security commit... just in case

---
 src/dbus/callmanager.cpp     | 116 +++++++++++++++++++++++++++++++++++
 src/dbus/dbusmanagerimpl.cpp |   5 +-
 2 files changed, 119 insertions(+), 2 deletions(-)
 create mode 100644 src/dbus/callmanager.cpp

diff --git a/src/dbus/callmanager.cpp b/src/dbus/callmanager.cpp
new file mode 100644
index 0000000000..28e4ec2fbd
--- /dev/null
+++ b/src/dbus/callmanager.cpp
@@ -0,0 +1,116 @@
+/*
+ *  Copyright (C) 2007 Savoir-Faire Linux inc.
+ *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
+ *                                                                              
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *                                                                                
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *                                                                              
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ 
+#include <callmanager.h>
+
+const char* CallManager::SERVER_PATH = "/org/sflphone/SFLPhone/CallManager";
+
+CallManager::CallManager( DBus::Connection& connection )
+: DBus::ObjectAdaptor(connection, SERVER_PATH)
+{
+}
+
+void
+CallManager::placeCall( const ::DBus::String& accountID, 
+                        const ::DBus::String& callID,          
+                        const ::DBus::String& to )
+{
+    _debug("CallManager::placeCall received\n");
+
+}
+
+void
+CallManager::refuse( const ::DBus::String& callID )
+{
+    _debug("CallManager::refuse received\n");
+
+}
+
+void
+CallManager::accept( const ::DBus::String& callID )
+{
+    _debug("CallManager::accept received\n");
+
+}
+
+void
+CallManager::hangUp( const ::DBus::String& callID )
+{
+    _debug("CallManager::hangUp received\n");
+
+}
+
+void
+CallManager::hold( const ::DBus::String& callID )
+{
+    _debug("CallManager::hold received\n");
+
+}
+
+void
+CallManager::unhold( const ::DBus::String& callID )
+{
+    _debug("CallManager::unhold received\n");
+
+}
+
+void
+CallManager::transfert( const ::DBus::String& callID, const ::DBus::String& to )
+{
+    _debug("CallManager::transfert received\n");
+
+}
+
+void
+CallManager::setVolume( const ::DBus::String& device, const ::DBus::Double & value )
+{
+    _debug("CallManager::setVolume received\n");
+
+}
+
+::DBus::Double 
+CallManager::getVolume( const ::DBus::String& device )
+{
+    _debug("CallManager::getVolume received\n");
+    return 0;
+}
+
+::DBus::Int32 
+CallManager::getVoiceMailCount(  )
+{
+    _debug("CallManager::getVoiceMailCount received\n");
+    return 0;
+}
+
+std::map< ::DBus::String, ::DBus::String > 
+CallManager::getCallDetails( const ::DBus::String& callID )
+{
+    _debug("CallManager::getCallDetails received\n");
+    std::map<std::string, std::string> a;
+    return a;
+}
+
+::DBus::String 
+CallManager::getCurrentCallID(  )
+{
+    _debug("CallManager::getCurrentCallID received\n");
+    return "test";
+}
+
+
diff --git a/src/dbus/dbusmanagerimpl.cpp b/src/dbus/dbusmanagerimpl.cpp
index f6361f7c9d..7a99692480 100644
--- a/src/dbus/dbusmanagerimpl.cpp
+++ b/src/dbus/dbusmanagerimpl.cpp
@@ -24,17 +24,18 @@ const char* DBusManagerImpl::SERVER_NAME = "org.sflphone.SFLPhone";
 
 int 
 DBusManagerImpl::exec(){
-
+    
 	DBus::default_dispatcher = &_dispatcher;
 
 	DBus::Connection conn = DBus::Connection::SessionBus();
 	conn.request_name(SERVER_NAME);
 
 	_callManager = new CallManager(conn);
-    //_callManager = new CallManager(conn);
+    //_configurationManager = new ConfigurationManager(conn);
     
     Manager::instance().getEvents();  // Register accounts
     
+    _debug("Starting DBus event loop\n");
 	_dispatcher.enter();
 
 	return 1;
-- 
GitLab