From 1295ecf98f5366452a70c35d56b3abf29dcffb96 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Thu, 21 Sep 2006 08:31:35 +0000 Subject: [PATCH] Start for the call history service --- .../callhistory/CallHistoryService.java | 59 ++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java index 05eb9fb35..6e26a71b8 100644 --- a/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java +++ b/src/net/java/sip/communicator/service/callhistory/CallHistoryService.java @@ -6,10 +6,65 @@ */ package net.java.sip.communicator.service.callhistory; -import net.java.sip.communicator.service.history.*; +import java.util.*; + +import net.java.sip.communicator.service.contactlist.*; /** + * The Call History Service stores info about calls made from various protocols + * * @author Alexander Pelov + * @author Damian Minkov */ -public interface CallHistoryService extends HistoryReader { +public interface CallHistoryService +{ + /** + * Returns all the calls made by all the contacts + * in the supplied metacontact after the given date + * + * @param contact MetaContact + * @param startDate Date the start date of the calls + * @return Collection of CallReceivedEvent + * @throws RuntimeException + */ + Collection findByStartDate(MetaContact contact, Date startDate) + throws RuntimeException; + + /** + * Returns all the calls made by all the contacts + * in the supplied metacontact before the given date + * + * @param contact MetaContact + * @param endDate Date the end date of the calls + * @return Collection of CallReceivedEvent + * @throws RuntimeException + */ + Collection findByEndDate(MetaContact contact, Date endDate) + throws RuntimeException; + + /** + * Returns all the calls made by all the contacts + * in the supplied metacontact between the given dates + * + * @param contact MetaContact + * @param startDate Date the start date of the calls + * @param endDate Date the end date of the calls + * @return Collection of CallReceivedEvent + * @throws RuntimeException + */ + Collection findByPeriod(MetaContact contact, Date startDate, Date endDate) + throws RuntimeException; + + /** + * Returns the supplied number of recent calls made by all the contacts + * in the supplied metacontact + * + * @param contact MetaContact + * @param count calls count + * @return Collection of CallReceivedEvent + * @throws RuntimeException + */ + Collection findLast(MetaContact contact, int count) + throws RuntimeException; + }