00001 using System; 00002 00003 /* 00004 * ITransferProtocol.cs 00005 * 00006 * Copyright (c) 2006 Tamir Gal, http://www.tamirgal.com, All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions are met: 00010 * 00011 * 1. Redistributions of source code must retain the above copyright notice, 00012 * this list of conditions and the following disclaimer. 00013 * 00014 * 2. Redistributions in binary form must reproduce the above copyright 00015 * notice, this list of conditions and the following disclaimer in 00016 * the documentation and/or other materials provided with the distribution. 00017 * 00018 * 3. The names of the authors may not be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, 00022 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00023 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 00024 * *OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 00025 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00026 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00027 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00028 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00029 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * 00032 **/ 00033 namespace Tamir.SharpSsh 00034 { 00038 public interface ITransferProtocol 00039 { 00040 void Connect(); 00041 void Close(); 00042 void Cancel(); 00043 void Get(string fromFilePath, string toFilePath); 00044 void Put(string fromFilePath, string toFilePath); 00045 void Mkdir(string directory); 00049 event FileTransferEvent OnTransferStart; 00053 event FileTransferEvent OnTransferEnd; 00057 event FileTransferEvent OnTransferProgress; 00058 } 00059 00060 public delegate void FileTransferEvent(string src, string dst, int transferredBytes, int totalBytes, string message); 00061 }
1.5.9