diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2014-11-27 15:55:05 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2014-11-27 16:14:49 +0100 |
commit | 32de2595ac51308df94043d8f99008d8cebe9915 (patch) | |
tree | fd8e800b83045bf170b881c4f6505546b8a4c363 /src | |
parent | bdf3b9aa26d32c087e10f5678f5860c3b5da7757 (diff) | |
download | jitsi-32de2595ac51308df94043d8f99008d8cebe9915.zip jitsi-32de2595ac51308df94043d8f99008d8cebe9915.tar.gz jitsi-32de2595ac51308df94043d8f99008d8cebe9915.tar.bz2 |
Add API to erase the call history
Diffstat (limited to 'src')
-rw-r--r-- | src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java | 14 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/callhistory/CallHistoryService.java | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java index f0214f4..425ce16 100644 --- a/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java +++ b/src/net/java/sip/communicator/impl/callhistory/CallHistoryServiceImpl.java @@ -773,6 +773,20 @@ public class CallHistoryServiceImpl } /** + * Permanently removes all locally stored call history. + * + * @throws java.io.IOException + * Thrown if the history could not be removed due to a IO error. + */ + public void eraseLocallyStoredHistory() + throws IOException + { + HistoryID historyId = HistoryID.createFromRawID( + new String[] { "callhistory" }); + historyService.purgeLocallyStoredHistory(historyId); + } + + /** * When new protocol provider is registered we check * does it supports BasicTelephony and if so add a listener to it * diff --git a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java index acc9f7c..1b4ff1cd 100644 --- a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java +++ b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java @@ -6,6 +6,7 @@ */ package net.java.sip.communicator.service.callhistory; +import java.io.*; import java.util.*; import net.java.sip.communicator.service.callhistory.event.*; @@ -170,4 +171,12 @@ public interface CallHistoryService */ public void removeCallHistoryRecordListener( CallHistoryPeerRecordListener listener); + + /** + * Permanently removes all locally stored call history. + * + * @throws java.io.IOException Thrown if the history could not be removed + * due to a IO error. + */ + public void eraseLocallyStoredHistory() throws IOException; } |