Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
121
Issues
121
List
Boards
Labels
Milestones
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
c2b1c028
Commit
c2b1c028
authored
Sep 19, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused getRegistrationCount()
sflphone daemon can not work without DBus
parent
a5e48b94
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
132 deletions
+21
-132
daemon/src/dbus/dbusmanager.cpp
daemon/src/dbus/dbusmanager.cpp
+3
-9
daemon/src/dbus/dbusmanager.h
daemon/src/dbus/dbusmanager.h
+0
-5
daemon/src/dbus/instance-introspec.xml
daemon/src/dbus/instance-introspec.xml
+0
-13
daemon/src/dbus/instance.cpp
daemon/src/dbus/instance.cpp
+1
-12
daemon/src/managerimpl.cpp
daemon/src/managerimpl.cpp
+16
-53
daemon/src/managerimpl.h
daemon/src/managerimpl.h
+1
-1
gnome/src/dbus/instance-introspec.xml
gnome/src/dbus/instance-introspec.xml
+0
-13
kde/src/dbus/instance-introspec.xml
kde/src/dbus/instance-introspec.xml
+0
-13
kde/src/lib/dbus/instance-introspec.xml
kde/src/lib/dbus/instance-introspec.xml
+0
-13
No files found.
daemon/src/dbus/dbusmanager.cpp
View file @
c2b1c028
...
...
@@ -28,6 +28,7 @@
* as that of the covered work.
*/
#include <cstdlib>
#include <dbusmanager.h>
#include "global.h"
#include "manager.h"
...
...
@@ -38,13 +39,6 @@
#include "networkmanager.h"
DBusManager
::
DBusManager
()
:
_connected
(
false
)
,
_callManager
(
NULL
)
,
_configurationManager
(
NULL
)
,
_instanceManager
(
NULL
)
#ifdef USE_NETWORKMANAGER
,
_networkManager
(
NULL
)
#endif
{
try
{
DBus
::
_init_threading
();
...
...
@@ -62,9 +56,9 @@ DBusManager::DBusManager()
_networkManager
=
new
NetworkManager
(
systemConnection
,
"/org/freedesktop/NetworkManager"
,
""
);
#endif
_connected
=
true
;
}
catch
(
const
DBus
::
Error
&
err
)
{
_error
(
"%s: %s
\n
"
,
err
.
name
(),
err
.
what
());
_error
(
"%s: %s, exiting
\n
"
,
err
.
name
(),
err
.
what
());
::
exit
(
1
);
}
}
...
...
daemon/src/dbus/dbusmanager.h
View file @
c2b1c028
...
...
@@ -54,15 +54,10 @@ class DBusManager
return
_configurationManager
;
};
bool
isConnected
()
const
{
return
_connected
;
}
void
exec
();
void
exit
();
private:
bool
_connected
;
CallManager
*
_callManager
;
ConfigurationManager
*
_configurationManager
;
Instance
*
_instanceManager
;
...
...
daemon/src/dbus/instance-introspec.xml
View file @
c2b1c028
...
...
@@ -29,18 +29,5 @@
</tp:docstring>
</arg>
</method>
<method
name=
"getRegistrationCount"
tp:name-for-bindings=
"getRegistrationCount"
>
<tp:docstring>
Get the number of connected clients.
</tp:docstring>
<arg
type=
"i"
name=
"count"
direction=
"out"
>
<tp:docstring>
The number of client currently connected to the core
</tp:docstring>
</arg>
</method>
</interface>
</node>
daemon/src/dbus/instance.cpp
View file @
c2b1c028
...
...
@@ -31,10 +31,8 @@
#include <instance.h>
#include "../manager.h"
const
char
*
Instance
::
SERVER_PATH
=
"/org/sflphone/SFLphone/Instance"
;
Instance
::
Instance
(
DBus
::
Connection
&
connection
)
:
DBus
::
ObjectAdaptor
(
connection
,
SERVER_PATH
)
:
DBus
::
ObjectAdaptor
(
connection
,
"/org/sflphone/SFLphone/Instance"
)
{
count
=
0
;
}
...
...
@@ -43,7 +41,6 @@ void
Instance
::
Register
(
const
int32_t
&
pid
UNUSED
,
const
std
::
string
&
name
UNUSED
)
{
_debug
(
"Instance::register received"
);
count
++
;
}
...
...
@@ -51,7 +48,6 @@ Instance::Register (const int32_t& pid UNUSED,
void
Instance
::
Unregister
(
const
int32_t
&
pid
UNUSED
)
{
_debug
(
"Instance::unregister received"
);
count
--
;
if
(
count
<=
0
)
{
...
...
@@ -59,10 +55,3 @@ Instance::Unregister (const int32_t& pid UNUSED)
Manager
::
instance
().
getDbusManager
()
->
exit
();
}
}
int32_t
Instance
::
getRegistrationCount
(
void
)
{
return
count
;
}
daemon/src/managerimpl.cpp
View file @
c2b1c028
...
...
@@ -142,6 +142,8 @@ void ManagerImpl::terminate ()
unloadAccountMap
();
delete
SIPVoIPLink
::
instance
();
delete
_dtmfKey
;
delete
_telephoneTone
;
...
...
@@ -209,9 +211,8 @@ bool ManagerImpl::outgoingCall (const std::string& account_id,
std
::
string
to_cleaned
(
NumberCleaner
::
clean
(
to
,
prefix
));
Call
::
CallConfiguration
callConfig
;
/* Check what kind of call we are dealing with */
checkCallConfiguration
(
call_id
,
to_cleaned
,
&
callConfig
);
Call
::
CallConfiguration
callConfig
=
checkCallConfiguration
(
call_id
,
to_cleaned
);
associateConfigToCall
(
call_id
,
callConfig
);
// in any cases we have to detach from current communication
if
(
hasCurrentCall
())
{
...
...
@@ -1684,8 +1685,7 @@ void ManagerImpl::startVoiceMessageNotification (const std::string& accountId,
void
ManagerImpl
::
connectionStatusNotification
()
{
if
(
_dbus
.
isConnected
())
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
}
/**
...
...
@@ -2618,8 +2618,7 @@ std::string ManagerImpl::addAccount (
saveConfig
();
if
(
_dbus
.
isConnected
())
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
return
accountID
.
str
();
}
...
...
@@ -2640,10 +2639,7 @@ void ManagerImpl::removeAccount (const std::string& accountID)
saveConfig
();
_debug
(
"REMOVE ACCOUNT"
);
if
(
_dbus
.
isConnected
())
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
_dbus
.
getConfigurationManager
()
->
accountsChanged
();
}
// ACCOUNT handling
...
...
@@ -2704,8 +2700,6 @@ std::vector<std::string> ManagerImpl::loadAccountOrder (void) const
void
ManagerImpl
::
loadAccountMap
(
Conf
::
YamlParser
*
parser
)
{
SIPVoIPLink
*
link
=
SIPVoIPLink
::
instance
();
// build a default IP2IP account with default parameters
Account
*
ip2ip
=
new
SIPAccount
(
IP2IP_PROFILE
);
_accountMap
[
IP2IP_PROFILE
]
=
ip2ip
;
...
...
@@ -2727,7 +2721,7 @@ void ManagerImpl::loadAccountMap(Conf::YamlParser *parser)
// Initialize default UDP transport according to
// IP to IP settings (most likely using port 5060)
link
->
createDefaultSipUdpTransport
();
SIPVoIPLink
::
instance
()
->
createDefaultSipUdpTransport
();
// Force IP2IP settings to be loaded to be loaded
// No registration in the sense of the REGISTER method is performed.
...
...
@@ -2776,8 +2770,6 @@ void ManagerImpl::loadAccountMap(Conf::YamlParser *parser)
void
ManagerImpl
::
unloadAccountMap
()
{
_debug
(
"Manager: Unload account map"
);
AccountMap
::
iterator
iter
;
for
(
iter
=
_accountMap
.
begin
();
iter
!=
_accountMap
.
end
();
++
iter
)
{
// Avoid removing the IP2IP account twice
...
...
@@ -2786,8 +2778,6 @@ void ManagerImpl::unloadAccountMap ()
}
_accountMap
.
clear
();
delete
SIPVoIPLink
::
instance
();
}
bool
ManagerImpl
::
accountExists
(
const
std
::
string
&
accountID
)
...
...
@@ -2861,8 +2851,6 @@ std::map<std::string, int32_t> ManagerImpl::getAddressbookSettings () const
void
ManagerImpl
::
setAddressbookSettings
(
const
std
::
map
<
std
::
string
,
int32_t
>&
settings
)
{
_debug
(
"Manager: Update addressbook settings"
);
addressbookPreference
.
setEnabled
(
settings
.
find
(
"ADDRESSBOOK_ENABLE"
)
->
second
==
1
);
addressbookPreference
.
setMaxResults
(
settings
.
find
(
"ADDRESSBOOK_MAX_RESULTS"
)
->
second
);
addressbookPreference
.
setPhoto
(
settings
.
find
(
"ADDRESSBOOK_DISPLAY_CONTACT_PHOTO"
)
->
second
==
1
);
...
...
@@ -2878,11 +2866,7 @@ void ManagerImpl::setAddressbookSettings (
void
ManagerImpl
::
setAddressbookList
(
const
std
::
vector
<
std
::
string
>&
list
)
{
_debug
(
"Manager: Set addressbook list"
);
std
::
string
s
=
ManagerImpl
::
serialize
(
list
);
_debug
(
"Manager: New addressbook list: %s"
,
s
.
c_str
());
addressbookPreference
.
setList
(
s
);
addressbookPreference
.
setList
(
ManagerImpl
::
serialize
(
list
));
saveConfig
();
}
...
...
@@ -2921,20 +2905,9 @@ void ManagerImpl::setHookSettings (const std::map<std::string, std::string>& set
// saveConfig();
}
void
ManagerImpl
::
checkCallConfiguration
(
const
std
::
string
&
id
,
const
std
::
string
&
to
,
Call
::
CallConfiguration
*
callConfig
)
Call
::
CallConfiguration
ManagerImpl
::
checkCallConfiguration
(
const
std
::
string
&
id
,
const
std
::
string
&
to
)
{
Call
::
CallConfiguration
config
;
if
(
to
.
find
(
SIP_SCHEME
)
==
0
or
to
.
find
(
SIPS_SCHEME
)
==
0
)
{
_debug
(
"Manager: Sip scheme detected (sip: or sips:), sending IP2IP Call"
);
config
=
Call
::
IPtoIP
;
}
else
config
=
Call
::
Classic
;
associateConfigToCall
(
id
,
config
);
*
callConfig
=
config
;
return
(
to
.
find
(
SIP_SCHEME
)
==
0
or
to
.
find
(
SIPS_SCHEME
)
==
0
)
?
Call
::
IPtoIP
:
Call
::
Classic
;
}
bool
ManagerImpl
::
associateConfigToCall
(
const
std
::
string
&
callID
,
...
...
@@ -3006,17 +2979,12 @@ std::map<std::string, std::string> ManagerImpl::getCallDetails (const std::strin
std
::
vector
<
std
::
string
>
ManagerImpl
::
getHistorySerialized
(
void
)
const
{
_debug
(
"Manager: Get history serialized"
);
return
_history
->
get_history_serialized
();
}
void
ManagerImpl
::
setHistorySerialized
(
std
::
vector
<
std
::
string
>
history
)
{
_debug
(
"Manager: Set history serialized"
);
_history
->
set_serialized_history
(
history
,
preferences
.
getHistoryLimit
());;
_history
->
set_serialized_history
(
history
,
preferences
.
getHistoryLimit
());;
_history
->
save_history
();
}
...
...
@@ -3056,21 +3024,16 @@ std::vector<std::string> ManagerImpl::getConferenceList (void) const
{
std
::
vector
<
std
::
string
>
v
;
vectorFromMapKeys
(
_conferencemap
,
v
);
return
v
;
}
std
::
vector
<
std
::
string
>
ManagerImpl
::
getParticipantList
(
const
std
::
string
&
confID
)
const
{
ConferenceMap
::
const_iterator
iter_conf
=
_conferencemap
.
find
(
confID
);
Conference
*
conf
=
NULL
;
if
(
iter_conf
!=
_conferencemap
.
end
())
conf
=
iter_conf
->
second
;
std
::
vector
<
std
::
string
>
v
;
if
(
conf
)
{
const
ParticipantSet
&
participants
=
conf
->
getParticipantList
();
ConferenceMap
::
const_iterator
iter_conf
=
_conferencemap
.
find
(
confID
);
if
(
iter_conf
!=
_conferencemap
.
end
())
{
const
ParticipantSet
&
participants
=
iter_conf
->
second
->
getParticipantList
();
std
::
copy
(
participants
.
begin
(),
participants
.
end
(),
std
::
back_inserter
(
v
));;
}
else
_warn
(
"Manager: Warning: Did not found conference %s"
,
confID
.
c_str
());
...
...
daemon/src/managerimpl.h
View file @
c2b1c028
...
...
@@ -1227,7 +1227,7 @@ class ManagerImpl
/**
* Check if the call is a classic call or a direct IP-to-IP call
*/
void
checkCallConfiguration
(
const
std
::
string
&
id
,
const
std
::
string
&
to
,
Call
::
CallConfiguration
*
callConfig
);
Call
::
CallConfiguration
checkCallConfiguration
(
const
std
::
string
&
id
,
const
std
::
string
&
to
);
Conf
::
YamlEmitter
*
emitter
;
};
...
...
gnome/src/dbus/instance-introspec.xml
View file @
c2b1c028
...
...
@@ -29,18 +29,5 @@
</tp:docstring>
</arg>
</method>
<method
name=
"getRegistrationCount"
tp:name-for-bindings=
"getRegistrationCount"
>
<tp:docstring>
Get the number of connected clients.
</tp:docstring>
<arg
type=
"i"
name=
"count"
direction=
"out"
>
<tp:docstring>
The number of client currently connected to the core
</tp:docstring>
</arg>
</method>
</interface>
</node>
kde/src/dbus/instance-introspec.xml
View file @
c2b1c028
...
...
@@ -29,18 +29,5 @@
</tp:docstring>
</arg>
</method>
<method
name=
"getRegistrationCount"
tp:name-for-bindings=
"getRegistrationCount"
>
<tp:docstring>
Get the number of connected clients.
</tp:docstring>
<arg
type=
"i"
name=
"count"
direction=
"out"
>
<tp:docstring>
The number of client currently connected to the core
</tp:docstring>
</arg>
</method>
</interface>
</node>
kde/src/lib/dbus/instance-introspec.xml
View file @
c2b1c028
...
...
@@ -29,18 +29,5 @@
</tp:docstring>
</arg>
</method>
<method
name=
"getRegistrationCount"
tp:name-for-bindings=
"getRegistrationCount"
>
<tp:docstring>
Get the number of connected clients.
</tp:docstring>
<arg
type=
"i"
name=
"count"
direction=
"out"
>
<tp:docstring>
The number of client currently connected to the core
</tp:docstring>
</arg>
</method>
</interface>
</node>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment