com.voiceclearly.api.model
Class Call

java.lang.Object
  extended by com.voiceclearly.api.model.Call

public class Call
extends java.lang.Object

The Call class represents a Google Talk voice call and includes information such as the other particpant in the call, the call direction, call state, and the duration of the call if it is in active state.


Field Summary
static int CALL_DIRECTION_INBOUND
          Call Direction of inbound represents a call arriving from another participant
static int CALL_DIRECTION_OUTBOUND
          Call Direction of outbound represents a call that has been initiated by the client
static int CALL_STATE_ACTIVE
          Call State when a Google Talk voice call is active
static int CALL_STATE_DISCONNECTED
          Call State when a Google Talk voice call has ended.
static int CALL_STATE_ERROR
          Call State when an error has occurred in a Google Talk voice call
static int CALL_STATE_INCOMING
          Call State when a an inbound Google Talk voice call has arrived
static int CALL_STATE_OUTGOING
          Call State when an outbound Google Talk voice call has been made
static int CALL_STATE_READY
          Call State when the voice service is available and ready to take a ca..
 
Constructor Summary
Call()
          Class constructor for a Call
Call(java.lang.String participant, int callDirection)
          Class constructor that includes the particpant (the other party in the call) and the call direction of either CALL_DIRECTION_OUTBOUND or CALL_DIRECTION_INBOUND
 
Method Summary
 int getCallDirection()
          Retrieves the call direction either inbound or outbound
 int getCallState()
          Retrieves the call state
 long getDuration()
          Retrieves the call duration
 java.lang.String getParticipant()
          The other party (participant) in the call.
 java.lang.String getSessionId()
          Returns the current call session id
 void setCallDirection(int callDirection)
          Sets the call direction either inbound or outbound
 void setCallState(int callState)
          Sets the call state
 void setParticipant(java.lang.String participant)
          Sets the other party in the call
 void setSessionId(java.lang.String sessionId)
          Sets the session id for the call, typically same as the jingle session id
 void startCall()
          Marks the start of a voice call
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CALL_STATE_READY

public static final int CALL_STATE_READY
Call State when the voice service is available and ready to take a ca..

See Also:
Constant Field Values

CALL_STATE_INCOMING

public static final int CALL_STATE_INCOMING
Call State when a an inbound Google Talk voice call has arrived

See Also:
Constant Field Values

CALL_STATE_OUTGOING

public static final int CALL_STATE_OUTGOING
Call State when an outbound Google Talk voice call has been made

See Also:
Constant Field Values

CALL_STATE_ACTIVE

public static final int CALL_STATE_ACTIVE
Call State when a Google Talk voice call is active

See Also:
Constant Field Values

CALL_STATE_DISCONNECTED

public static final int CALL_STATE_DISCONNECTED
Call State when a Google Talk voice call has ended.

See Also:
Constant Field Values

CALL_STATE_ERROR

public static final int CALL_STATE_ERROR
Call State when an error has occurred in a Google Talk voice call

See Also:
Constant Field Values

CALL_DIRECTION_INBOUND

public static final int CALL_DIRECTION_INBOUND
Call Direction of inbound represents a call arriving from another participant

See Also:
Constant Field Values

CALL_DIRECTION_OUTBOUND

public static final int CALL_DIRECTION_OUTBOUND
Call Direction of outbound represents a call that has been initiated by the client

See Also:
Constant Field Values
Constructor Detail

Call

public Call(java.lang.String participant,
            int callDirection)
Class constructor that includes the particpant (the other party in the call) and the call direction of either CALL_DIRECTION_OUTBOUND or CALL_DIRECTION_INBOUND

Parameters:
participant -
callDirection -

Call

public Call()
Class constructor for a Call

Method Detail

startCall

public void startCall()
Marks the start of a voice call


getDuration

public long getDuration()
Retrieves the call duration

Returns:
call duration in seconds

getSessionId

public java.lang.String getSessionId()
Returns the current call session id

Returns:
the sessionId unique id of the current call

setSessionId

public void setSessionId(java.lang.String sessionId)
Sets the session id for the call, typically same as the jingle session id

Parameters:
sessionId - the sessionId to set

getCallDirection

public int getCallDirection()
Retrieves the call direction either inbound or outbound

Returns:
the callDirection

setCallDirection

public void setCallDirection(int callDirection)
Sets the call direction either inbound or outbound

Parameters:
callDirection - the callDirection to set

getCallState

public int getCallState()
Retrieves the call state

Returns:
the callState the current call state

setCallState

public void setCallState(int callState)
Sets the call state

Parameters:
callState - the callState to set

getParticipant

public java.lang.String getParticipant()
The other party (participant) in the call.

Returns:
the participant

setParticipant

public void setParticipant(java.lang.String participant)
Sets the other party in the call

Parameters:
participant - the participant to set