blob: 0c02846ec58be27e0190e686f47ab9fd25902ee5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.protocol;
import java.io.*;
import net.java.sip.communicator.service.protocol.event.*;
/**
* The File Transfer Operation Set provides an interface towards those functions
* of a given protocol, that allow transferring files among users.
*
* @author Emil Ivov
* @author Yana Stamcheva
*/
public interface OperationSetFileTransfer
extends OperationSet
{
/**
* Sends a file transfer request to the given <tt>toContact</tt> by
* specifying the local and remote file path and the <tt>fromContact</tt>,
* sending the file.
*
* @param toContact the contact that should receive the file
* @param file the file to send
*
* @return the transfer object
*
* @throws IllegalStateException if the protocol provider is not registered
* or connected
* @throws IllegalArgumentException if some of the arguments doesn't fit the
* protocol requirements
*/
public FileTransfer sendFile( Contact toContact,
File file)
throws IllegalStateException,
IllegalArgumentException;
/**
* Sends a file transfer request to the given <tt>toContact</tt> by
* specifying the local and remote file path and the <tt>fromContact</tt>,
* sending the file.
*
* @param toContact the contact that should receive the file
* @param fromContact the contact sending the file
* @param remotePath the remote file path
* @param localPath the local file path
*
* @return the transfer object
*
* @throws IllegalStateException if the protocol provider is not registered
* or connected
* @throws IllegalArgumentException if some of the arguments doesn't fit the
* protocol requirements
*/
public FileTransfer sendFile( Contact toContact,
Contact fromContact,
String remotePath,
String localPath)
throws IllegalStateException,
IllegalArgumentException;
/**
* Adds the given <tt>FileTransferListener</tt> that would listen for
* file transfer requests and created file transfers.
*
* @param listener the <tt>FileTransferListener</tt> to add
*/
public void addFileTransferListener(
FileTransferListener listener);
/**
* Removes the given <tt>FileTransferListener</tt> that listens for
* file transfer requests and created file transfers.
*
* @param listener the <tt>FileTransferListener</tt> to remove
*/
public void removeFileTransferListener(
FileTransferListener listener);
}
|