com.skype
Class Call

java.lang.Object
  extended by com.skype.Call
All Implemented Interfaces:
Serializable

public final class Call
extends Object

This class implements all features of the SKYPE CALL protocol.

Author:
Koji Hisano
See Also:
Skype API reference - Commands - Making and managing voice calls, Skype API reference - Commands - Making and managing video calls, Skype API reference - Objects - CALL object, Skype API reference - Notifications - Object notifications - Call notifications, Serialized Form

Nested Class Summary
static class Call.DTMF
          Enumeration of DTMF types.
static class Call.Status
          Enumeration of call status types.
static class Call.Type
          Enumeration of CALL types.
static class Call.VideoStatus
          Enumeration of video status types.
 
Method Summary
 void addCallStatusChangedListener(CallStatusChangedListener listener)
          Add a listener for the Status field.
 void answer()
          Answer a ringing CALL.
 void cancel()
          Cancel a CALL.
 boolean canTransferTo(String skypeId)
           
 void clearFileCaptureMic()
           
 void clearFileInput()
           
 void clearFileOutput()
           
 void clearPortCaptureMic()
           
 void clearPortInput()
           
 void clearPortOutput()
           
 boolean equals(Object compared)
          Implement a equals check method.
 void finish()
          End a CALL.
 void forward()
          Forward a ringing CALL to profile forwarding rule.
 String getConferenceId()
          Return the conference ID of this CALL.
 Object getData(String name)
          Returns the user data to which this object maps to the specified by the name.
 int getDuration()
          Return the duration of this CALL.
 int getErrorCode()
          Return the reason of failure.
 String getId()
          Return the ID of the CALL object.
 String getParticipantsCount()
           
 User getPartner()
          Return the Skype user who is the partner in this CALL.
 String getPartnerDisplayName()
          Return the DISPLAYNAME of the other user in this CALL.
 String getPartnerId()
          Return the Skype handle of the other user in this CALL.
 Call.VideoStatus getReceiveVideoStatus()
          Return the status of receiving video with this CALL.
 Call.VideoStatus getSendVideoStatus()
          Return the status of sending video with this CALL.
 Date getStartTime()
          Get the starttime of this CALL object.
 Call.Status getStatus()
          Return the current status of this CALL.
 Call.Type getType()
          Return the type of this call.
 int hashCode()
          Use the CALL ID as the hashcode.
 void hold()
          Put this CALL on hold.
 boolean isReceiveVideoEnabled()
          Check if video receiving is enabled for this CALL.
 boolean isSendVideoEnabled()
          Check if video sending is enabled for this CALL.
 void redirectToVoiceMail()
          Redirect a ringing CALL to a voice mail.
 void removeCallStatusChangedListener(CallStatusChangedListener listener)
          Remove a listener to the status of this CALL object.
 void resume()
          Resume an on hold CALL.
 void send(Call.DTMF command)
          Send a DTMF command.
 void setData(String name, Object userData)
          Associates the specified user data with the specified name in this object.
 void setFileCaptureMic(File file)
           
 void setFileInput(File file)
           
 void setFileOutput(File file)
           
 void setPortCaptureMic(int port)
           
 void setPortInput(int port)
           
 void setPortOutput(int port)
           
 void setReceiveVideoEnabled(boolean videoStatus)
          Start or stop receiving video on this call.
 void setSendVideoEnabled(boolean videoStatus)
          Start or stop sending video with this call.
 void transferTo(String... skypeIds)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hashCode

public int hashCode()
Use the CALL ID as the hashcode.

Overrides:
hashCode in class Object
Returns:
id.

equals

public boolean equals(Object compared)
Implement a equals check method. Check ID field for equalness.

Overrides:
equals in class Object
Parameters:
compared - the object to compare to.
Returns:
true if objects are equal.

getId

public String getId()
Return the ID of the CALL object.

Returns:
the ID.

addCallStatusChangedListener

public void addCallStatusChangedListener(CallStatusChangedListener listener)
Add a listener for the Status field. The listener will be triggered every time the status of this CALL object is changed.

Parameters:
listener - the listener to add.

removeCallStatusChangedListener

public void removeCallStatusChangedListener(CallStatusChangedListener listener)
Remove a listener to the status of this CALL object. If listener is already removed nothing happens.

Parameters:
listener - the listener to remove.

hold

public void hold()
          throws SkypeException
Put this CALL on hold.

Throws:
SkypeException - when connection is bad.

resume

public void resume()
            throws SkypeException
Resume an on hold CALL.

Throws:
SkypeException - when connection is bad.

finish

public void finish()
            throws SkypeException
End a CALL.

Throws:
SkypeException - when connection is bad.

answer

public void answer()
            throws SkypeException
Answer a ringing CALL.

Throws:
SkypeException - when connection is bad.

cancel

public void cancel()
            throws SkypeException
Cancel a CALL.

Throws:
SkypeException - when connection is bad.

forward

public void forward()
             throws SkypeException
Forward a ringing CALL to profile forwarding rule.

Throws:
SkypeException - when connection is bad.

redirectToVoiceMail

public void redirectToVoiceMail()
                         throws SkypeException
Redirect a ringing CALL to a voice mail.

Throws:
SkypeException - when connection is bad.

send

public void send(Call.DTMF command)
          throws SkypeException
Send a DTMF command.

Throws:
SkypeException - when connection is bad.

getStartTime

public Date getStartTime()
                  throws SkypeException
Get the starttime of this CALL object.

Returns:
the starttime.
Throws:
SkypeException - when connection is bad.

getPartner

public User getPartner()
                throws SkypeException
Return the Skype user who is the partner in this CALL.

Returns:
the other Skype user.
Throws:
SkypeException - when connection is bad.

getPartnerId

public String getPartnerId()
                    throws SkypeException
Return the Skype handle of the other user in this CALL.

Returns:
The handle.
Throws:
SkypeException - when connection is bad.

getPartnerDisplayName

public String getPartnerDisplayName()
                             throws SkypeException
Return the DISPLAYNAME of the other user in this CALL.

Returns:
DISPLAYNAME.
Throws:
SkypeException - when connection is bad.

getType

public Call.Type getType()
                  throws SkypeException
Return the type of this call.

Returns:
call type.
Throws:
SkypeException - when connection is bad.

getStatus

public Call.Status getStatus()
                      throws SkypeException
Return the current status of this CALL.

Returns:
Status of this call.
Throws:
SkypeException - when connection is bad.

getDuration

public int getDuration()
                throws SkypeException
Return the duration of this CALL.

Returns:
duration of this call.
Throws:
SkypeException - when connection is bad.

getErrorCode

public int getErrorCode()
                 throws SkypeException
Return the reason of failure.

Returns:
FAILUREREASON.
Throws:
SkypeException - when connection is bad.

setReceiveVideoEnabled

public void setReceiveVideoEnabled(boolean videoStatus)
                            throws SkypeException
Start or stop receiving video on this call.

Parameters:
videoStatus - enable = true.
Throws:
SkypeException - when connection is bad.

isReceiveVideoEnabled

public boolean isReceiveVideoEnabled()
                              throws SkypeException
Check if video receiving is enabled for this CALL.

Returns:
true if enabled.
Throws:
SkypeException - when connection is bad.

setSendVideoEnabled

public void setSendVideoEnabled(boolean videoStatus)
                         throws SkypeException
Start or stop sending video with this call.

Parameters:
videoStatus - enable = true.
Throws:
SkypeException - when connection is bad.

isSendVideoEnabled

public boolean isSendVideoEnabled()
                           throws SkypeException
Check if video sending is enabled for this CALL.

Returns:
true if enabled.
Throws:
SkypeException - when connection is bad.

getReceiveVideoStatus

public Call.VideoStatus getReceiveVideoStatus()
                                       throws SkypeException
Return the status of receiving video with this CALL.

Returns:
videoStatus of this call.
Throws:
SkypeException - when connection is bad.

getSendVideoStatus

public Call.VideoStatus getSendVideoStatus()
                                    throws SkypeException
Return the status of sending video with this CALL.

Returns:
videoStatus of this call.
Throws:
SkypeException - when connection is bad.

getConferenceId

public String getConferenceId()
                       throws SkypeException
Return the conference ID of this CALL.

Returns:
The conference ID
Throws:
SkypeException - when connection is bad.

getParticipantsCount

public String getParticipantsCount()
                            throws SkypeException
Throws:
SkypeException

setFileInput

public void setFileInput(File file)
                  throws SkypeException
Throws:
SkypeException

clearFileInput

public void clearFileInput()
                    throws SkypeException
Throws:
SkypeException

setFileOutput

public void setFileOutput(File file)
                   throws SkypeException
Throws:
SkypeException

clearFileOutput

public void clearFileOutput()
                     throws SkypeException
Throws:
SkypeException

setFileCaptureMic

public void setFileCaptureMic(File file)
                       throws SkypeException
Throws:
SkypeException

clearFileCaptureMic

public void clearFileCaptureMic()
                         throws SkypeException
Throws:
SkypeException

setPortInput

public void setPortInput(int port)
                  throws SkypeException
Throws:
SkypeException

clearPortInput

public void clearPortInput()
                    throws SkypeException
Throws:
SkypeException

setPortOutput

public void setPortOutput(int port)
                   throws SkypeException
Throws:
SkypeException

clearPortOutput

public void clearPortOutput()
                     throws SkypeException
Throws:
SkypeException

setPortCaptureMic

public void setPortCaptureMic(int port)
                       throws SkypeException
Throws:
SkypeException

clearPortCaptureMic

public void clearPortCaptureMic()
                         throws SkypeException
Throws:
SkypeException

canTransferTo

public boolean canTransferTo(String skypeId)
                      throws SkypeException
Throws:
SkypeException

transferTo

public void transferTo(String... skypeIds)
                throws SkypeException
Throws:
SkypeException

getData

public final Object getData(String name)
Returns the user data to which this object maps to the specified by the name. Returns null if this object contains no mapping for the name.

Parameters:
name - name whose associated user data is to be returned.
Returns:
the user data to which this object maps the specified name, or null if this object contains no mapping for the name.
See Also:
Map.get(Object)

setData

public final void setData(String name,
                          Object userData)
Associates the specified user data with the specified name in this object.

Parameters:
name - name with which the specified user data is to be associated.
userData - user data to be associated with the specified name.
See Also:
Map.put(Object, Object)


Copyright © 2004-2011. All Rights Reserved.