Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
92df44c8
Commit
92df44c8
authored
Apr 02, 2010
by
Alexandre Savard
Browse files
[#3116] Delete history items
parent
8e14a8a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/history/historymanager.cpp
View file @
92df44c8
...
...
@@ -32,9 +32,19 @@ HistoryManager::HistoryManager ()
HistoryManager
::~
HistoryManager
()
{
HistoryItemMap
::
iterator
iter
=
_history_items
.
begin
();
HistoryItem
*
item
;
while
(
iter
!=
_history_items
.
end
()){
item
=
iter
->
second
;
delete
item
;
iter
++
;
}
// Clear the history map
_history_items
.
clear
();
}
int
HistoryManager
::
load_history
(
int
limit
,
std
::
string
path
)
...
...
sflphone-common/src/managerimpl.cpp
View file @
92df44c8
...
...
@@ -91,9 +91,10 @@ ManagerImpl::ManagerImpl (void) :
// never call if we use only the singleton...
ManagerImpl
::~
ManagerImpl
(
void
)
{
// terminate();
delete
_cleaner
;
_cleaner
=
0
;
_debug
(
"%s stop correctly."
,
PROGNAME
);
delete
_cleaner
;
_cleaner
=
NULL
;
delete
_history
;
_history
=
NULL
;
_debug
(
"Manager: %s stop correctly."
,
PROGNAME
);
}
void
ManagerImpl
::
init
()
{
...
...
@@ -104,7 +105,7 @@ void ManagerImpl::init () {
initVolume
();
if
(
_exist
==
0
)
{
_
debug
(
"
Cannot create config file in your home directory"
);
_
warn
(
"Manager:
Cannot create config file in your home directory"
);
}
initAudioDriver
();
...
...
@@ -119,11 +120,11 @@ void ManagerImpl::init () {
if
(
audiolayer
!=
0
)
{
unsigned
int
sampleRate
=
audiolayer
->
getSampleRate
();
_debugInit
(
"Load
T
elephone
T
one"
);
_debugInit
(
"
Manager:
Load
t
elephone
t
one"
);
std
::
string
country
=
getConfigString
(
PREFERENCES
,
ZONE_TONE
);
_telephoneTone
=
new
TelephoneTone
(
country
,
sampleRate
);
_debugInit
(
"Loading DTMF key"
);
_debugInit
(
"
Manager:
Loading DTMF key"
);
_dtmfKey
=
new
DTMF
(
sampleRate
);
}
...
...
@@ -135,23 +136,25 @@ void ManagerImpl::init () {
}
void
ManagerImpl
::
terminate
()
{
_debug
(
"ManagerImpl::terminate "
);
_debug
(
"Manager: Terminate "
);
saveConfig
();
unloadAccountMap
();
_debug
(
"Unload DTMF
K
ey
"
);
_debug
(
"
Manager:
Unload DTMF
k
ey"
);
delete
_dtmfKey
;
_debug
(
"Unload Audio Driver "
);
delete
_audiodriver
;
_audiodriver
=
NULL
;
_debug
(
"Manager: Unload telephone tone"
);
delete
_telephoneTone
;
_telephoneTone
=
NULL
;
_debug
(
"Manager: Unload audio driver"
);
delete
_audiodriver
;
_audiodriver
=
NULL
;
_debug
(
"Unload Telephone Tone "
);
delete
_telephoneTone
;
_telephoneTone
=
NULL
;
_debug
(
"Manager: Unload telephone tone"
);
delete
_telephoneTone
;
_telephoneTone
=
NULL
;
_debug
(
"Unload
A
udio
C
odecs "
);
_debug
(
"
Manager:
Unload
a
udio
c
odecs "
);
_codecDescriptorMap
.
deleteHandlePointer
();
}
...
...
Write
Preview
Supports
Markdown
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