mirror of https://github.com/sipwise/jitsi.git
parent
023e382a41
commit
c239edb6cc
@ -0,0 +1,54 @@
|
||||
package net.java.sip.communicator.impl.callhistory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.java.sip.communicator.service.callhistory.*;
|
||||
|
||||
/**
|
||||
* Added some setters to CallParticipantRecord
|
||||
* @author Damian Minkov
|
||||
*/
|
||||
public class CallParticipantRecordImpl
|
||||
extends CallParticipantRecord
|
||||
{
|
||||
/**
|
||||
* Creates CallParticipantRecord
|
||||
* @param participantAddress String
|
||||
* @param startTime Date
|
||||
* @param endTime Date
|
||||
*/
|
||||
public CallParticipantRecordImpl(
|
||||
String participantAddress,
|
||||
Date startTime,
|
||||
Date endTime)
|
||||
{
|
||||
super(participantAddress, startTime, endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the time the participant joined the call
|
||||
* @param startTime Date
|
||||
*/
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the particiapnts address
|
||||
* @param participantAddress String
|
||||
*/
|
||||
public void setParticipantAddress(String participantAddress)
|
||||
{
|
||||
this.participantAddress = participantAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the time participant leaves the call
|
||||
* @param endTime Date
|
||||
*/
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package net.java.sip.communicator.impl.callhistory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.java.sip.communicator.service.callhistory.*;
|
||||
import net.java.sip.communicator.service.protocol.*;
|
||||
|
||||
/**
|
||||
* Add Source call to the CallRecord
|
||||
* @author Damian Minkov
|
||||
*/
|
||||
public class CallRecordImpl
|
||||
extends CallRecord
|
||||
{
|
||||
private Call sourceCall = null;
|
||||
|
||||
/**
|
||||
* Creates CallRecord
|
||||
*/
|
||||
public CallRecordImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates Call Record
|
||||
* @param direction String
|
||||
* @param startTime Date
|
||||
* @param endTime Date
|
||||
*/
|
||||
public CallRecordImpl(
|
||||
String direction,
|
||||
Date startTime,
|
||||
Date endTime)
|
||||
{
|
||||
super(direction, startTime, endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* The Call source of this record
|
||||
* @return Call
|
||||
*/
|
||||
public Call getSourceCall()
|
||||
{
|
||||
return sourceCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time when the call finishes
|
||||
* If some participant has no end Time set we set it also
|
||||
* @param endTime Date
|
||||
*/
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
|
||||
Iterator iter = participantRecords.iterator();
|
||||
while (iter.hasNext())
|
||||
{
|
||||
CallParticipantRecordImpl item = (CallParticipantRecordImpl) iter.next();
|
||||
if(item.getEndTime() == null)
|
||||
item.setEndTime(endTime);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the time when the call begins
|
||||
* @param startTime Date
|
||||
*/
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* The source call which this record servers
|
||||
* @param sourceCall Call
|
||||
*/
|
||||
public void setSourceCall(Call sourceCall)
|
||||
{
|
||||
this.sourceCall = sourceCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the direction of the call
|
||||
* IN or OUT
|
||||
* @param direction String
|
||||
*/
|
||||
public void setDirection(String direction)
|
||||
{
|
||||
this.direction = direction;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue