jellyfin-server/Emby.Common.Implementations/IO/SharpCifs/Smb/DfsReferral.cs

73 lines
2.1 KiB
C#
Raw Normal View History

2017-04-02 00:36:06 +00:00
// This code is derived from jcifs smb client library <jcifs at samba dot org>
// Ported by J. Arturo <webmaster at komodosoft dot net>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System.Collections.Generic;
namespace SharpCifs.Smb
{
2017-06-21 06:46:57 +00:00
public class DfsReferral : SmbException
{
public int PathConsumed;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public long Ttl;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public string Server;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public string Share;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public string Link;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public string Path;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public bool ResolveHashes;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public long Expiration;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
internal DfsReferral Next;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
internal IDictionary<string, DfsReferral> Map;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
internal string Key = null;
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
public DfsReferral()
{
// Server
// Share
// Path relative to tree from which this referral was thrown
Next = this;
}
2017-04-02 00:36:06 +00:00
2017-06-21 06:46:57 +00:00
internal virtual void Append(DfsReferral dr)
{
dr.Next = Next;
Next = dr;
}
public override string ToString()
{
return "DfsReferral[pathConsumed=" + PathConsumed
+ ",server=" + Server
+ ",share=" + Share
+ ",link=" + Link
+ ",path=" + Path
+ ",ttl=" + Ttl
+ ",expiration=" + Expiration
+ ",resolveHashes=" + ResolveHashes + "]";
}
}
2017-04-02 00:36:06 +00:00
}