|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.skype.ipc.SidObject
com.skype.api.Transfer
public final class Transfer
Transfer in this context refers to transferring (sending/receiving) files among Skype Contacts, not transferring a call to another Skype or PSTN Contact. This class includes file transfer-specific properties and methods, such as FILESIZE, BYTESPERSECOND, Pause and Resume. Recipients of these file transfers must explicitly accept (or decline) any incoming transfer. Transfer instances represent files being sent and received within a Conversation context. Each Transfer instance represents a single file transfer - if a conversation has multiple remote participants, a separate Transfer instance must be instantiated for each remote participant (a Transfer instance is not instantiated for the sender). Transfer instances cannot be instantiated directly. Instead, you initiate a file transfer by invoking Conversation.PostFiles. This instantiates a Message instance of type POSTED_FILES, which is added to the Conversation for all the participants (including the sender). The Transfer instance is associated with this Message instance, and the Message.P_BODY_XML looks like this:
| Nested Class Summary | |
|---|---|
static class |
Transfer.FailureReason
|
static class |
Transfer.Property
Properties of the Transfer class |
static class |
Transfer.Status
Recognized values for the P_STATUS property. |
static class |
Transfer.Type
|
| Field Summary | |
|---|---|
int |
mBytesPerSecond
|
java.lang.String |
mBytesTransferred
|
byte[] |
mChatMsgGuid
|
int |
mChatMsgIndex
|
Conversation |
mConversation
|
Transfer.FailureReason |
mFailureReason
|
java.lang.String |
mFileName
|
java.lang.String |
mFilePath
|
java.lang.String |
mFileSize
|
int |
mFinishTime
|
java.lang.String |
mPartnerDisplayName
|
java.lang.String |
mPartnerHandle
|
int |
mStartTime
|
Transfer.Status |
mStatus
|
Transfer.Type |
mType
|
| Fields inherited from class com.skype.ipc.SidObject |
|---|
mSidCached, mSidOid, mSidRoot, mSidTimestamp |
| Constructor Summary | |
|---|---|
Transfer(int oid,
SidRoot root)
|
|
| Method Summary | |
|---|---|
boolean |
accept(java.lang.String filenameWithPath)
Accepts an incoming file transfer and saves it to specified file on the local file system. |
void |
cancel()
Cancels an in-progress file transfer. |
int |
getBytesPerSecond()
Current data transfer speed in bytes per second. |
java.lang.String |
getBytesTransferred()
The number of bytes already transferred. |
byte[] |
getChatMsgGuid()
The "global ID" of this Transfer's associated Message instance. |
int |
getChatMsgIndex()
A more or less arbitrary index for ordering multiple file transfers within the UI. |
Conversation |
getConversation()
The "global ID" of this Transfer's associated Conversation (as chained through its associated Message). |
Transfer.FailureReason |
getFailureReason()
Set whenever P_STATUS transitions to FAILED. |
java.lang.String |
getFileName()
The filename -only- of the file being transfered. |
java.lang.String |
getFilePath()
The path -and- filename of the file being transfered (typically fully qualified). |
java.lang.String |
getFileSize()
The size of the file being transferred in bytes. |
int |
getFinishTime()
UNIX timestamp of when this Transfer COMPLETED or FAILED. |
java.lang.String |
getPartnerDisplayName()
Display name of the remote participant. |
java.lang.String |
getPartnerHandle()
Skype Name of the remote party of the file transfer. |
java.lang.String |
getPropertyAsString(int prop)
|
java.lang.String |
getPropertyAsString(Transfer.Property prop)
|
int |
getStartTime()
UNIX timestamp of when this Transfer instance was instantiated, not when the transfer process actually started (was accepted from receiver side). |
Transfer.Status |
getStatus()
Current state of the transfer |
Transfer.Type |
getType()
INCOMING / OUTGOING |
int |
moduleId()
|
void |
pause()
Temporarily pauses an in-progress incoming or outgoing file transfer. |
void |
resume()
Resumes a previously paused file transfer. |
byte[] |
sidGetBinaryProperty(PropertyEnumConverting prop)
|
EnumConverting |
sidGetEnumProperty(PropertyEnumConverting prop)
|
int |
sidGetIntProperty(PropertyEnumConverting prop)
|
SidObject |
sidGetObjectProperty(PropertyEnumConverting prop)
|
java.lang.String |
sidGetStringProperty(PropertyEnumConverting prop)
|
SidGetResponding |
sidMultiGet(Transfer.Property[] requested)
generic multiget of a list of Property |
static SidGetResponding[] |
sidMultiGet(Transfer.Property[] requested,
Transfer[] objects)
generic multiget of list of Property for a list of Transfer |
protected void |
sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
int newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
SidObject newValue)
|
void |
sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Transfer.Type mType
public java.lang.String mPartnerHandle
public java.lang.String mPartnerDisplayName
public Transfer.Status mStatus
public Transfer.FailureReason mFailureReason
public int mStartTime
public int mFinishTime
public java.lang.String mFilePath
public java.lang.String mFileName
public java.lang.String mFileSize
public java.lang.String mBytesTransferred
public int mBytesPerSecond
public byte[] mChatMsgGuid
public int mChatMsgIndex
public Conversation mConversation
| Constructor Detail |
|---|
public Transfer(int oid,
SidRoot root)
| Method Detail |
|---|
public boolean accept(java.lang.String filenameWithPath)
public void pause()
public void resume()
public void cancel()
public SidGetResponding sidMultiGet(Transfer.Property[] requested)
requested - the list of requested properties of Transfer
public static SidGetResponding[] sidMultiGet(Transfer.Property[] requested,
Transfer[] objects)
requested - the list of requested properties
public Transfer.Type getType()
public java.lang.String getPartnerHandle()
public java.lang.String getPartnerDisplayName()
public Transfer.Status getStatus()
public Transfer.FailureReason getFailureReason()
public int getStartTime()
public int getFinishTime()
public java.lang.String getFilePath()
public java.lang.String getFileName()
public java.lang.String getFileSize()
public java.lang.String getBytesTransferred()
public int getBytesPerSecond()
public byte[] getChatMsgGuid()
public int getChatMsgIndex()
public Conversation getConversation()
public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
sidGetStringProperty in interface SidGetRespondingsidGetStringProperty in class SidObjectpublic SidObject sidGetObjectProperty(PropertyEnumConverting prop)
sidGetObjectProperty in interface SidGetRespondingsidGetObjectProperty in class SidObjectpublic int sidGetIntProperty(PropertyEnumConverting prop)
sidGetIntProperty in interface SidGetRespondingsidGetIntProperty in class SidObjectpublic EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)
sidGetEnumProperty in interface SidGetRespondingsidGetEnumProperty in class SidObjectpublic byte[] sidGetBinaryProperty(PropertyEnumConverting prop)
sidGetBinaryProperty in interface SidGetRespondingsidGetBinaryProperty in class SidObjectpublic java.lang.String getPropertyAsString(int prop)
public java.lang.String getPropertyAsString(Transfer.Property prop)
protected void sidOnChangedProperty(int propertyId,
int value,
java.lang.String svalue)
sidOnChangedProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
java.lang.String newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
SidObject newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
int newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObject
public void sidSetProperty(PropertyEnumConverting prop,
byte[] newValue)
sidSetProperty in interface SidGetRespondingsidSetProperty in class SidObjectpublic int moduleId()
moduleId in class SidObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||