Skip to content

Commit

Permalink
remove unused files and classes
Browse files Browse the repository at this point in the history
  • Loading branch information
lelmarir committed Oct 14, 2015
1 parent 4d6c4a6 commit 4505ac6
Show file tree
Hide file tree
Showing 18 changed files with 4 additions and 1,133 deletions.
2 changes: 1 addition & 1 deletion CmisSync.Lib/Auth/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static IList<IRepository> GetCmisRepositories(Uri url, string user, Passw
Dictionary<string, string> parameters = GetParameters();
parameters[SessionParameter.AtomPubUrl] = url.ToString();
parameters[SessionParameter.User] = user;
parameters[SessionParameter.Password] = Crypto.Deobfuscate(obfuscatedPassword.ObfuscatedPassword);
parameters[SessionParameter.Password] = CryptoUtils.Deobfuscate(obfuscatedPassword.ObfuscatedPassword);

// Create session factory.
SessionFactory factory = SessionFactory.NewInstance();
Expand Down
4 changes: 2 additions & 2 deletions CmisSync.Lib/Auth/Credentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class Password
/// <param name="password">as plain text</param>
public Password(string password)
{
this.password = Crypto.Obfuscate(password);
this.password = CryptoUtils.Obfuscate(password);
}

/// <summary>
Expand Down Expand Up @@ -104,7 +104,7 @@ public string ToString()
{
if (password == null)
return null;
return Crypto.Deobfuscate(password);
return CryptoUtils.Deobfuscate(password);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion CmisSync.Lib/Auth/Crypto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace CmisSync.Lib.Auth
/// Obfuscation for sensitive data, making password harvesting a little less straightforward.
/// Web browsers employ the same technique to store user passwords.
/// </summary>
public static class Crypto
public static class CryptoUtils
{
/// <summary>
/// Obfuscate a string.
Expand Down
175 changes: 0 additions & 175 deletions CmisSync.Lib/ChunkedStream.cs

This file was deleted.

116 changes: 0 additions & 116 deletions CmisSync.Lib/Cmis/CmisUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,6 @@

namespace CmisSync.Lib.Cmis
{
/// <summary>
/// Data object representing a CMIS server.
/// </summary>
public class CmisServer
{
/// <summary>
/// URL of the CMIS server.
/// </summary>
public Uri Url { get; private set; }

/// <summary>
/// Repositories contained in the CMIS server.
/// </summary>
public Dictionary<string, string> Repositories { get; private set; }

/// <summary>
/// Constructor.
/// </summary>
public CmisServer(Uri url, Dictionary<string, string> repositories)
{
Url = url;
Repositories = repositories;
}
}

/// <summary>
/// Useful CMIS methods.
/// </summary>
Expand Down Expand Up @@ -254,97 +229,6 @@ static public string[] GetSubfolders(string repositoryId, string path,
return result.ToArray();
}


/// <summary>
/// Folder tree.
/// </summary>
public class FolderTree
{
/// <summary>
/// Children.
/// </summary>
public List<FolderTree> Children = new List<FolderTree>();

/// <summary>
/// Folder path.
/// </summary>
public string Path;

/// <summary>
/// Folder name.
/// </summary>
public string Name { get; set; }

/// <summary>
///
/// </summary>
public bool Finished { get; set; }

/// <summary>
/// Constructor.
/// </summary>
public FolderTree(IList<ITree<IFileableCmisObject>> trees, IFolder folder, int depth)
{
this.Path = folder.Path;
this.Name = folder.Name;
if (depth == 0)
{
this.Finished = false;
}
else
{
this.Finished = true;
}

if (trees != null)
{
foreach (ITree<IFileableCmisObject> tree in trees)
{
Folder f = tree.Item as Folder;
if (f != null)
this.Children.Add(new FolderTree(tree.Children, f, depth - 1));
}
}
}
}

///// <summary>
///// Get the sub-folders of a particular CMIS folder.
///// </summary>
///// <returns>Full path of each sub-folder, including leading slash.</returns>
//static public FolderTree GetSubfolderTree( CmisRepoCredentials credentials, string path, int depth)
//{
// // Connect to the CMIS repository.
// ISession session = Auth.Auth.GetCmisSession(credentials.Address.ToString(), credentials.UserName, credentials.Password.ToString(), credentials.RepoId);

// // Get the folder.
// IFolder folder;
// try
// {
// folder = (IFolder)session.GetObjectByPath(path);
// }
// catch (Exception ex)
// {
// Logger.Warn(String.Format("CmisUtils | exception when session GetObjectByPath for {0}", path), ex);
// throw;
// }

// // Debug the properties count, which allows to check whether a particular CMIS implementation is compliant or not.
// // For instance, IBM Connections is known to send an illegal count.
// Logger.Info("CmisUtils | folder.Properties.Count:" + folder.Properties.Count.ToString());
// try
// {
// IList<ITree<IFileableCmisObject>> trees = folder.GetFolderTree(depth);
// return new FolderTree(trees, folder, depth);
// }
// catch (Exception e)
// {
// Logger.Info("CmisUtils getSubFolderTree | Exception " + e.Message, e);
// throw;
// }
//}


/// <summary>
/// Guess the web address where files can be seen using a browser.
/// Not bulletproof. It depends on the server, and on some servers there is no web UI at all.
Expand Down
8 changes: 0 additions & 8 deletions CmisSync.Lib/CmisSync.Lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@
<Compile Include="ConfigManager.cs" />
<Compile Include="ConfigMigration.cs" />
<Compile Include="Database\Database.cs" />
<Compile Include="Events\ActiveActivitiesManager.cs" />
<Compile Include="Events\ConfigChangedEvent.cs" />
<Compile Include="Events\DebugLoggingHandler.cs" />
<Compile Include="Events\FileTransmissionEvent.cs" />
<Compile Include="Events\ISyncEvent.cs" />
<Compile Include="Events\SyncEventHandler.cs" />
<Compile Include="Events\SyncEventManager.cs" />
<Compile Include="Events\SyncEventQueue.cs" />
<Compile Include="FolderLock.cs" />
<Compile Include="LoggingStream.cs" />
<Compile Include="ModelBase.cs" />
Expand Down
Loading

0 comments on commit 4505ac6

Please sign in to comment.