aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java
diff options
context:
space:
mode:
authorBenoit Pradelle <pradelle@java.net>2008-02-04 16:41:35 +0000
committerBenoit Pradelle <pradelle@java.net>2008-02-04 16:41:35 +0000
commit2a144b5a1f6138e8b8246287daf6ccfe25699fe2 (patch)
tree21d0fe7cc7f052d32e15a6ee717450d0bedb9845 /src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java
parentffd5c40f7095797869a9921be740600f470dc194 (diff)
downloadjitsi-2a144b5a1f6138e8b8246287daf6ccfe25699fe2.zip
jitsi-2a144b5a1f6138e8b8246287daf6ccfe25699fe2.tar.gz
jitsi-2a144b5a1f6138e8b8246287daf6ccfe25699fe2.tar.bz2
Apply the last version by Shobhit and finally activate SSH
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java
index b09efd0..7a4da04 100644
--- a/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/ssh/OperationSetFileTransferSSHImpl.java
@@ -52,13 +52,13 @@ public class OperationSetFileTransferSSHImpl
/** Creates a new instance of OperationSetFileTransferSSHImpl */
public OperationSetFileTransferSSHImpl(
- ProtocolProviderServiceSSHImpl parentProvider,
- OperationSetPersistentPresenceSSHImpl opSetPersPresence,
- OperationSetBasicInstantMessagingSSHImpl instantMessaging)
+ ProtocolProviderServiceSSHImpl parentProvider)
{
this.parentProvider = parentProvider;
- this.opSetPersPresence = opSetPersPresence;
- this.instantMessaging = instantMessaging;
+ this.opSetPersPresence = (OperationSetPersistentPresenceSSHImpl)
+ parentProvider.getOperationSet(OperationSetPersistentPresence.class);
+ this.instantMessaging = (OperationSetBasicInstantMessagingSSHImpl)
+ parentProvider.getOperationSet(OperationSetBasicInstantMessaging.class);
}
/**
@@ -91,16 +91,14 @@ public class OperationSetFileTransferSSHImpl
{
if(toContact == null)
{
- ContactSSHFileTransferDaemon fileTransferDaemon
- = new ContactSSHFileTransferDaemon(
+ SSHFileTransferDaemon fileTransferDaemon
+ = new SSHFileTransferDaemon(
(ContactSSH)fromContact,
- opSetPersPresence,
- instantMessaging,
parentProvider);
if(localPath.endsWith(System.getProperty("file.separator")))
- localPath += remotePath.substring(remotePath.lastIndexOf('/')
- + 1);
+ localPath += remotePath.substring(remotePath.lastIndexOf(
+ System.getProperty("file.separator")) + 1);
fileTransferDaemon.downloadFile(
remotePath,
@@ -110,11 +108,9 @@ public class OperationSetFileTransferSSHImpl
}
else if(fromContact == null)
{
- ContactSSHFileTransferDaemon fileTransferDaemon
- = new ContactSSHFileTransferDaemon(
+ SSHFileTransferDaemon fileTransferDaemon
+ = new SSHFileTransferDaemon(
(ContactSSH) toContact,
- opSetPersPresence,
- instantMessaging,
parentProvider);
fileTransferDaemon.uploadFile(
@@ -125,7 +121,7 @@ public class OperationSetFileTransferSSHImpl
}
// code should not reach here
- //assert false;
+ // assert false;
logger.error("we should not be here !");
}