Skip to content

Commit b85c8db

Browse files
committed
remove unused files and classes
1 parent 4d6c4a6 commit b85c8db

15 files changed

+4
-814
lines changed

CmisSync.Lib/Auth/Auth.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static IList<IRepository> GetCmisRepositories(Uri url, string user, Passw
2727
Dictionary<string, string> parameters = GetParameters();
2828
parameters[SessionParameter.AtomPubUrl] = url.ToString();
2929
parameters[SessionParameter.User] = user;
30-
parameters[SessionParameter.Password] = Crypto.Deobfuscate(obfuscatedPassword.ObfuscatedPassword);
30+
parameters[SessionParameter.Password] = CryptoUtils.Deobfuscate(obfuscatedPassword.ObfuscatedPassword);
3131

3232
// Create session factory.
3333
SessionFactory factory = SessionFactory.NewInstance();

CmisSync.Lib/Auth/Credentials.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class Password
6969
/// <param name="password">as plain text</param>
7070
public Password(string password)
7171
{
72-
this.password = Crypto.Obfuscate(password);
72+
this.password = CryptoUtils.Obfuscate(password);
7373
}
7474

7575
/// <summary>
@@ -104,7 +104,7 @@ public string ToString()
104104
{
105105
if (password == null)
106106
return null;
107-
return Crypto.Deobfuscate(password);
107+
return CryptoUtils.Deobfuscate(password);
108108
}
109109

110110
/// <summary>

CmisSync.Lib/Auth/Crypto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace CmisSync.Lib.Auth
99
/// Obfuscation for sensitive data, making password harvesting a little less straightforward.
1010
/// Web browsers employ the same technique to store user passwords.
1111
/// </summary>
12-
public static class Crypto
12+
public static class CryptoUtils
1313
{
1414
/// <summary>
1515
/// Obfuscate a string.

CmisSync.Lib/Cmis/CmisUtils.cs

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,6 @@
1313

1414
namespace CmisSync.Lib.Cmis
1515
{
16-
/// <summary>
17-
/// Data object representing a CMIS server.
18-
/// </summary>
19-
public class CmisServer
20-
{
21-
/// <summary>
22-
/// URL of the CMIS server.
23-
/// </summary>
24-
public Uri Url { get; private set; }
25-
26-
/// <summary>
27-
/// Repositories contained in the CMIS server.
28-
/// </summary>
29-
public Dictionary<string, string> Repositories { get; private set; }
30-
31-
/// <summary>
32-
/// Constructor.
33-
/// </summary>
34-
public CmisServer(Uri url, Dictionary<string, string> repositories)
35-
{
36-
Url = url;
37-
Repositories = repositories;
38-
}
39-
}
40-
4116
/// <summary>
4217
/// Useful CMIS methods.
4318
/// </summary>
@@ -254,97 +229,6 @@ static public string[] GetSubfolders(string repositoryId, string path,
254229
return result.ToArray();
255230
}
256231

257-
258-
/// <summary>
259-
/// Folder tree.
260-
/// </summary>
261-
public class FolderTree
262-
{
263-
/// <summary>
264-
/// Children.
265-
/// </summary>
266-
public List<FolderTree> Children = new List<FolderTree>();
267-
268-
/// <summary>
269-
/// Folder path.
270-
/// </summary>
271-
public string Path;
272-
273-
/// <summary>
274-
/// Folder name.
275-
/// </summary>
276-
public string Name { get; set; }
277-
278-
/// <summary>
279-
///
280-
/// </summary>
281-
public bool Finished { get; set; }
282-
283-
/// <summary>
284-
/// Constructor.
285-
/// </summary>
286-
public FolderTree(IList<ITree<IFileableCmisObject>> trees, IFolder folder, int depth)
287-
{
288-
this.Path = folder.Path;
289-
this.Name = folder.Name;
290-
if (depth == 0)
291-
{
292-
this.Finished = false;
293-
}
294-
else
295-
{
296-
this.Finished = true;
297-
}
298-
299-
if (trees != null)
300-
{
301-
foreach (ITree<IFileableCmisObject> tree in trees)
302-
{
303-
Folder f = tree.Item as Folder;
304-
if (f != null)
305-
this.Children.Add(new FolderTree(tree.Children, f, depth - 1));
306-
}
307-
}
308-
}
309-
}
310-
311-
///// <summary>
312-
///// Get the sub-folders of a particular CMIS folder.
313-
///// </summary>
314-
///// <returns>Full path of each sub-folder, including leading slash.</returns>
315-
//static public FolderTree GetSubfolderTree( CmisRepoCredentials credentials, string path, int depth)
316-
//{
317-
// // Connect to the CMIS repository.
318-
// ISession session = Auth.Auth.GetCmisSession(credentials.Address.ToString(), credentials.UserName, credentials.Password.ToString(), credentials.RepoId);
319-
320-
// // Get the folder.
321-
// IFolder folder;
322-
// try
323-
// {
324-
// folder = (IFolder)session.GetObjectByPath(path);
325-
// }
326-
// catch (Exception ex)
327-
// {
328-
// Logger.Warn(String.Format("CmisUtils | exception when session GetObjectByPath for {0}", path), ex);
329-
// throw;
330-
// }
331-
332-
// // Debug the properties count, which allows to check whether a particular CMIS implementation is compliant or not.
333-
// // For instance, IBM Connections is known to send an illegal count.
334-
// Logger.Info("CmisUtils | folder.Properties.Count:" + folder.Properties.Count.ToString());
335-
// try
336-
// {
337-
// IList<ITree<IFileableCmisObject>> trees = folder.GetFolderTree(depth);
338-
// return new FolderTree(trees, folder, depth);
339-
// }
340-
// catch (Exception e)
341-
// {
342-
// Logger.Info("CmisUtils getSubFolderTree | Exception " + e.Message, e);
343-
// throw;
344-
// }
345-
//}
346-
347-
348232
/// <summary>
349233
/// Guess the web address where files can be seen using a browser.
350234
/// Not bulletproof. It depends on the server, and on some servers there is no web UI at all.

CmisSync.Lib/CmisSync.Lib.csproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@
8282
<Compile Include="ConfigManager.cs" />
8383
<Compile Include="ConfigMigration.cs" />
8484
<Compile Include="Database\Database.cs" />
85-
<Compile Include="Events\ActiveActivitiesManager.cs" />
86-
<Compile Include="Events\ConfigChangedEvent.cs" />
87-
<Compile Include="Events\DebugLoggingHandler.cs" />
88-
<Compile Include="Events\FileTransmissionEvent.cs" />
89-
<Compile Include="Events\ISyncEvent.cs" />
90-
<Compile Include="Events\SyncEventHandler.cs" />
91-
<Compile Include="Events\SyncEventManager.cs" />
92-
<Compile Include="Events\SyncEventQueue.cs" />
9385
<Compile Include="FolderLock.cs" />
9486
<Compile Include="LoggingStream.cs" />
9587
<Compile Include="ModelBase.cs" />

CmisSync.Lib/Events/ActiveActivitiesManager.cs

Lines changed: 0 additions & 70 deletions
This file was deleted.

CmisSync.Lib/Events/ConfigChangedEvent.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

CmisSync.Lib/Events/DebugLoggingHandler.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)