Changes for directories
authorPanagiotis Kanavos <pkanavos@gmail.com>
Mon, 9 Jan 2012 16:54:42 +0000 (18:54 +0200)
committerPanagiotis Kanavos <pkanavos@gmail.com>
Mon, 9 Jan 2012 17:48:56 +0000 (19:48 +0200)
Added copyright notices

55 files changed:
trunk/Pithos.Client.Test/Properties/AssemblyInfo.cs
trunk/Pithos.Client.WPF/Caliburn/Micro/Logging/DebugLogger.cs
trunk/Pithos.Client.WPF/Caliburn/Micro/Logging/log4netLogger.cs
trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs
trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
trunk/Pithos.Client.WPF/PithosAccount.cs
trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
trunk/Pithos.Client.WPF/Services/StatusService.cs
trunk/Pithos.Client.WPF/Shell/AboutViewModel.cs
trunk/Pithos.Client.WPF/Shell/FeedbackViewModel.cs
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
trunk/Pithos.Core.Test/ExtensionTests.cs [new file with mode: 0644]
trunk/Pithos.Core.Test/Pithos.Core.Test.csproj
trunk/Pithos.Core.Test/Properties/AssemblyInfo.cs
trunk/Pithos.Core/Agents/Agent.cs
trunk/Pithos.Core/Agents/CloudTransferAction.cs
trunk/Pithos.Core/Agents/CollectionExtensions.cs [new file with mode: 0644]
trunk/Pithos.Core/Agents/FileAgent.cs
trunk/Pithos.Core/Agents/FileInfoExtensions.cs
trunk/Pithos.Core/Agents/NetworkAgent.cs
trunk/Pithos.Core/Agents/WorkflowAgent.cs
trunk/Pithos.Core/FileState.cs
trunk/Pithos.Core/IStatusService.cs
trunk/Pithos.Core/JobQueue.cs
trunk/Pithos.Core/NetworkGate.cs
trunk/Pithos.Core/Pithos.Core.csproj
trunk/Pithos.Core/Properties/AssemblyInfo.cs
trunk/Pithos.Interfaces/AccountSettings.cs
trunk/Pithos.Interfaces/FileInfoExtensions.cs
trunk/Pithos.Interfaces/PithosSettingsData.cs
trunk/Pithos.Interfaces/Properties/AssemblyInfo.cs
trunk/Pithos.Network.Test/Properties/AssemblyInfo.cs
trunk/Pithos.Network/CloudFilesClient.cs
trunk/Pithos.Network/Properties/AssemblyInfo.cs
trunk/Pithos.Network/RestClient.cs
trunk/Pithos.ShellExtensions.Test/Properties/AssemblyInfo.cs
trunk/Pithos.ShellExtensions/FileContext.cs
trunk/Pithos.ShellExtensions/IoC.cs
trunk/Pithos.ShellExtensions/LogCategories.cs
trunk/Pithos.ShellExtensions/Menus/DisplayFlags.cs
trunk/Pithos.ShellExtensions/Menus/FileContextMenu.cs
trunk/Pithos.ShellExtensions/Overlays/AddedIcodOverlay.cs
trunk/Pithos.ShellExtensions/Overlays/UnversionedIconOverlay.cs
trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj
trunk/Pithos.ShellExtensions/PithosHost.cs
trunk/Pithos.ShellExtensions/Properties/AssemblyInfo.cs
trunk/Pithos.ShellExtensions/Service References/PithosService/Reference.cs
trunk/Pithos.ShellExtensions/Service References/PithosService/StatusService.wsdl
trunk/Pithos.ShellExtensions/Service References/PithosService/mex.wsdl
trunk/Pithos.ShellExtensions/Service References/PithosService/mex1.wsdl
trunk/Pithos.ShellExtensions/Service References/PithosService/mex2.wsdl
trunk/Pithos.ShellExtensions/Service References/PithosService/mex2.xsd
trunk/Pithos.ShellExtensions/Service References/PithosService/mex5.xsd
trunk/Pithos.ShellExtensions/ShellSettings.cs
trunk/Pithos.ShellExtensions/ShellStatusChecker.cs

index 6054dd6..cb3c8c8 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.Client.Test")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Client.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index d274791..f40f65c 100644 (file)
@@ -1,4 +1,41 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="DebugLogger.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+using System;
 using System.Diagnostics;
 
 namespace Caliburn.Micro.Logging
index 5853ed1..047b93a 100644 (file)
@@ -1,4 +1,41 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="log4netLogger.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
index 26ed96b..838ed40 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="PithosSettings.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="PithosSettings.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 1ff5682..2efd787 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="FilePropertiesViewModel.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="FilePropertiesViewModel.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 69e9be9..6ce8344 100644 (file)
@@ -1,6 +1,38 @@
 // -----------------------------------------------------------------------
-// <copyright file="PithosAccount.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="PithosAccount.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
 // </copyright>
 // -----------------------------------------------------------------------
 
index c7986cb..bcd7633 100644 (file)
@@ -1,6 +1,38 @@
 // -----------------------------------------------------------------------
-// <copyright file="PreferencesViewModel.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="PreferencesViewModel.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
 // </copyright>
 // -----------------------------------------------------------------------
 
index 52f4632..057093d 100644 (file)
@@ -1,11 +1,45 @@
 // -----------------------------------------------------------------------
-// <copyright file="StatusService.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="StatusService.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
 
 using System;
+using System.Diagnostics;
+using System.Linq;
+using System.ServiceModel.Description;
 using Caliburn.Micro;
 using System.ServiceModel;
 using System.ComponentModel.Composition;
@@ -48,6 +82,20 @@ namespace Pithos.Client.WPF.Services
             //Monitor.
         }
 
+        public void GotoSite(string filePath)
+        {
+            if (string.IsNullOrWhiteSpace(filePath))
+                return;
+            var activeAccount = Settings.Accounts.FirstOrDefault(acc => filePath.StartsWith(acc.RootPath, StringComparison.InvariantCultureIgnoreCase));
+            var address = String.Format("{0}/ui/?token={1}&user={2}",
+                                        activeAccount.ServerUrl,
+                                        activeAccount.ApiKey,
+                                        Uri.EscapeUriString(activeAccount.AccountName));
+            
+            Process.Start(address);
+
+        }
+
         public PithosSettingsData GetSettings()
         {
             var data = new PithosSettingsData(Settings);
@@ -74,6 +122,7 @@ namespace Pithos.Client.WPF.Services
 
             //// Add a mex endpoint
 /*
+
             var smb = new ServiceMetadataBehavior
                           { 
                               HttpGetEnabled = true,
@@ -82,6 +131,7 @@ namespace Pithos.Client.WPF.Services
             service.Description.Behaviors.Add(smb);
 */
 
+
             service.Faulted+=OnError;
             service.Open();
             return service;
index 088b4ae..dbb764d 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="AboutViewModel.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="AboutViewModel.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 2eb22a2..e241c19 100644 (file)
@@ -1,9 +1,41 @@
 // -----------------------------------------------------------------------
-// <copyright file="FeedbackViewModel.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="FeedbackViewModel.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
+
 using System.Collections.Specialized;
 using System.ComponentModel.Composition;
 using System.Diagnostics;
index 7cdddf3..052a7fa 100644 (file)
@@ -730,11 +730,11 @@ namespace Pithos.Client.WPF {
             //TODO: Display file properties for non-container folders
                        if (File.Exists(fileName))
                 //Retrieve the full name with exact casing. Pithos names are case sensitive                            
-                ShowFileProperties(GetProperFilePathCapitalization(fileName));
+                ShowFileProperties(FileInfoExtensions.GetProperFilePathCapitalization(fileName));
                        else if (Directory.Exists(fileName))
                 //Retrieve the full name with exact casing. Pithos names are case sensitive
                        {
-                           var path = GetProperDirectoryCapitalization(fileName);
+                var path = FileInfoExtensions.GetProperDirectoryCapitalization(fileName);
                 if (IsContainer(path))
                                ShowContainerProperties(path);
                 else
@@ -751,33 +751,5 @@ namespace Pithos.Client.WPF {
                return matchingFolders.Any();
            }
 
-           static string GetProperDirectoryCapitalization(string fileName)
-        {
-            var dirInfo = new DirectoryInfo(fileName);
-            var parentDirInfo = dirInfo.Parent;
-            if (null == parentDirInfo)
-                return dirInfo.Name;
-            return Path.Combine(GetProperDirectoryCapitalization(parentDirInfo.FullName),
-                                parentDirInfo.GetDirectories(dirInfo.Name)[0].Name);
-        }
-
-        static string GetProperFilePathCapitalization(string fileName)
-        {
-            if (String.IsNullOrWhiteSpace(fileName))
-                throw new ArgumentNullException("fileName");
-            if (!Path.IsPathRooted(fileName))
-                throw new ArgumentException("fileName must be an absolute path","fileName");
-            Contract.EndContractBlock();
-
-            
-            var fileInfo = new FileInfo(fileName);
-            var dirInfo = fileInfo.Directory;
-            
-            //Directory will not be null for an absolute path
-            Contract.Assume(dirInfo!=null);
-            
-            return Path.Combine(GetProperDirectoryCapitalization(dirInfo.FullName),
-                                dirInfo.GetFiles(fileInfo.Name)[0].Name);
-        }
        }
 }
diff --git a/trunk/Pithos.Core.Test/ExtensionTests.cs b/trunk/Pithos.Core.Test/ExtensionTests.cs
new file mode 100644 (file)
index 0000000..c34450a
--- /dev/null
@@ -0,0 +1,79 @@
+// -----------------------------------------------------------------------\r
+// <copyright file="ExtensionTests.cs" company="GRNet">\r
+// Copyright 2011 GRNET S.A. All rights reserved.\r
+// \r
+// Redistribution and use in source and binary forms, with or\r
+// without modification, are permitted provided that the following\r
+// conditions are met:\r
+// \r
+//   1. Redistributions of source code must retain the above\r
+//      copyright notice, this list of conditions and the following\r
+//      disclaimer.\r
+// \r
+//   2. Redistributions in binary form must reproduce the above\r
+//      copyright notice, this list of conditions and the following\r
+//      disclaimer in the documentation and/or other materials\r
+//      provided with the distribution.\r
+// \r
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS\r
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR\r
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\r
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\r
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
+// POSSIBILITY OF SUCH DAMAGE.\r
+// \r
+// The views and conclusions contained in the software and\r
+// documentation are those of the authors and should not be\r
+// interpreted as representing official policies, either expressed\r
+// or implied, of GRNET S.A.\r
+// </copyright>\r
+// -----------------------------------------------------------------------\r
+\r
+using System.Collections.Concurrent;\r
+using NUnit.Framework;\r
+\r
+namespace Pithos.Core.Test\r
+{\r
+    using System.Linq;\r
+    using Agents;\r
+\r
+    /// <summary>\r
+    /// TODO: Update summary.\r
+    /// </summary>\r
+    [TestFixture]    \r
+    public class ExtensionTests\r
+    {\r
+        [Test]\r
+        public void TestRemoveConcurrent()\r
+        {\r
+            var test=new ConcurrentQueue<int>();\r
+            for (var i = 0; i < 100; i++)\r
+            {\r
+              test.Enqueue(i);  \r
+            }\r
+\r
+            test.RemoveFirst(t=>t==3);\r
+            Assert.IsFalse(test.Any(t => t == 3),"Item was not removed");\r
+            for (var i=0;i<3;i++)\r
+            {\r
+                int item;\r
+                Assert.IsTrue(test.TryDequeue(out item),"Missing items");\r
+                Assert.AreEqual(i, item,"Preceding items not queued correctly");\r
+            }\r
+            for (var i = 4; i < 100; i++)\r
+            {\r
+                int item;\r
+                Assert.IsTrue(test.TryDequeue(out item), "Missing items");\r
+                Assert.AreEqual(i, item, "Succeeding items not queued correctly");\r
+            }\r
+            \r
+            \r
+        }\r
+    }\r
+}\r
index 190f7cd..824f409 100644 (file)
@@ -47,6 +47,7 @@
     <CodeContractsRuntimeCheckingLevel>Full</CodeContractsRuntimeCheckingLevel>
     <CodeContractsReferenceAssembly>%28none%29</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="EnumerableExtensionsTest.cs" />
+    <Compile Include="ExtensionTests.cs" />
     <Compile Include="NetworkAgentTest.cs" />
     <Compile Include="PithosWorkflowTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
index d08db46..8984e2e 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.Core.Test")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Core.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index 486d459..57b08a7 100644 (file)
@@ -6,12 +6,14 @@ using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Pithos.Core.Agents;
 
 namespace Pithos.Core
 {
     public class Agent<TMessage> : IDisposable
-    {        
-        private readonly BlockingCollection<TMessage> _messages = new BlockingCollection<TMessage>();
+    {
+        private readonly ConcurrentQueue<TMessage> _queue;
+        private readonly BlockingCollection<TMessage> _messages;
         private readonly CancellationTokenSource _cancelSource = new CancellationTokenSource();
         public CancellationToken CancellationToken;
 
@@ -20,6 +22,8 @@ namespace Pithos.Core
 
         public Agent(Action<Agent<TMessage>> action)
         {
+            _queue=new ConcurrentQueue<TMessage>();
+            _messages = new BlockingCollection<TMessage>(_queue);
             _process = action;
             CancellationToken = _cancelSource.Token;
         }
@@ -132,6 +136,19 @@ namespace Pithos.Core
             return _messages;
         }
 
+        /// <summary>
+        /// Remove the first message that matches the predicate
+        /// </summary>
+        /// <param name="predicate">The condition to match</param>
+        /// <remarks>Removes the first message that matches the predicate by dequeing all 
+        /// messages and re-enqueing all except the first matching message</remarks>
+        public void Remove(Func<TMessage,bool> predicate)
+        {
+            //Can this work? Dequeue all items 
+            //and then enqueue everything except the filtered items
+
+            _queue.RemoveFirst(predicate);
+        }
 
         public Task LoopAsync(Task process, Action loop,Action<Exception> onError=null)
         {
index 0229104..7bd5005 100644 (file)
@@ -55,7 +55,7 @@ namespace Pithos.Core.Agents
         public CloudAction(AccountInfo accountInfo, CloudActionType action, FileSystemInfo localFile, ObjectInfo cloudFile, FileState state, int blockSize, string algorithm)
             : this(accountInfo,action)
         {
-            LocalFile = localFile;
+            LocalFile = localFile.WithProperCapitalization();
             CloudFile = cloudFile;
             FileState = state;
             if (LocalFile != null)
diff --git a/trunk/Pithos.Core/Agents/CollectionExtensions.cs b/trunk/Pithos.Core/Agents/CollectionExtensions.cs
new file mode 100644 (file)
index 0000000..2c90a65
--- /dev/null
@@ -0,0 +1,81 @@
+// -----------------------------------------------------------------------\r
+// <copyright file="CollectionExtensions.cs" company="GRNET">\r
+// Copyright 2011 GRNET S.A. All rights reserved.\r
+// \r
+// Redistribution and use in source and binary forms, with or\r
+// without modification, are permitted provided that the following\r
+// conditions are met:\r
+// \r
+//   1. Redistributions of source code must retain the above\r
+//      copyright notice, this list of conditions and the following\r
+//      disclaimer.\r
+// \r
+//   2. Redistributions in binary form must reproduce the above\r
+//      copyright notice, this list of conditions and the following\r
+//      disclaimer in the documentation and/or other materials\r
+//      provided with the distribution.\r
+// \r
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS\r
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR\r
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\r
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\r
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
+// POSSIBILITY OF SUCH DAMAGE.\r
+// \r
+// The views and conclusions contained in the software and\r
+// documentation are those of the authors and should not be\r
+// interpreted as representing official policies, either expressed\r
+// or implied, of GRNET S.A.\r
+// </copyright>\r
+// -----------------------------------------------------------------------\r
+\r
+using System.Collections.Concurrent;\r
+\r
+namespace Pithos.Core.Agents\r
+{\r
+    using System;\r
+    using System.Collections.Generic;\r
+    using System.Linq;\r
+    using System.Text;\r
+\r
+    /// <summary>\r
+    /// Extension methods for collections\r
+    /// </summary>\r
+    public static class CollectionExtensions\r
+    {\r
+        /// <summary>\r
+        /// Remove the first message in a queue that matches the predicate\r
+        /// </summary>\r
+        /// <param name="predicate">The condition to match</param>\r
+        /// <remarks>Removes the first message that matches the predicate by dequeing all \r
+        /// messages and re-enqueing all except the first matching message</remarks>\r
+        public static void RemoveFirst<TMessage>(this ConcurrentQueue<TMessage> queue, Func<TMessage, bool> predicate)\r
+        {\r
+            //Can this work? Dequeue all items \r
+            //and then enqueue everything except the filtered items\r
+\r
+            //Possible problems: \r
+            //* A matching item may be dequeued between one TryDequeue and the next\r
+            var temp = new Queue<TMessage>();\r
+            TMessage message;\r
+            var alreadyFound = false;\r
+            while (queue.TryDequeue(out message))\r
+            {\r
+                if (!predicate(message) || alreadyFound)\r
+                    temp.Enqueue(message);\r
+                else\r
+                {\r
+                    alreadyFound = true;\r
+                }\r
+            }\r
+\r
+            queue.AddFromEnumerable(temp);\r
+        }\r
+    }\r
+}\r
index eb53d06..c6a6fbd 100644 (file)
@@ -348,7 +348,7 @@ namespace Pithos.Core.Agents
             return false;
         }
 
-        public FileSystemInfo GetFileInfo(string relativePath)
+        public FileSystemInfo GetFileSystemInfo(string relativePath)
         {
             if (String.IsNullOrWhiteSpace(relativePath))
                 throw new ArgumentNullException("relativePath");
@@ -360,9 +360,9 @@ namespace Pithos.Core.Agents
             var absolutePath = Path.Combine(RootPath, relativePath);
 
             if (Directory.Exists(absolutePath))
-                return new DirectoryInfo(absolutePath);
+                return new DirectoryInfo(absolutePath).WithProperCapitalization();
             else
-                return new FileInfo(absolutePath);
+                return new FileInfo(absolutePath).WithProperCapitalization();
             
         }
 
index 4f8d309..23e9c13 100644 (file)
@@ -1,4 +1,42 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="FileInfoExtensions.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+
+using System;
 using System.Collections.Generic;
 using System.Diagnostics.Contracts;
 using System.Linq;
@@ -47,8 +85,5 @@ namespace Pithos.Core.Agents
                 return Signature.CalculateTreeHash(info.FullName, blockSize, algorithm).TopHash.ToHashString();
 
         }
-
-       
-
     }
 }
index 1ea5ffe..940c9f4 100644 (file)
@@ -1,4 +1,41 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="NetworkAgent.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.ComponentModel.Composition;
@@ -14,11 +51,15 @@ using log4net;
 
 namespace Pithos.Core.Agents
 {
+    //TODO: Ensure all network operations use exact casing. Pithos is case sensitive
     [Export]
     public class NetworkAgent
     {
         private Agent<CloudAction> _agent;
 
+        //A separate agent is used to execute delete actions immediatelly;
+        private Agent<CloudDeleteAction> _deleteAgent;
+
 
         [Import]
         public IStatusKeeper StatusKeeper { get; set; }
@@ -42,7 +83,20 @@ namespace Pithos.Core.Agents
                     inbox.LoopAsync(process, loop);
                 };
                 loop();
-            });           
+            });
+
+            _deleteAgent = Agent<CloudDeleteAction>.Start(inbox =>
+            {
+                Action loop = null;
+                loop = () =>
+                            {
+                                var message = inbox.Receive();
+                                var process = message.Then(ProcessDelete,inbox.CancellationToken);
+                                inbox.LoopAsync(process, loop);
+                            };
+                loop();
+
+            });
         }
 
         private async Task Process(CloudAction action)
@@ -75,7 +129,8 @@ namespace Pithos.Core.Agents
                             await DownloadCloudFile(accountInfo, cloudFile, downloadPath);
                             break;
                         case CloudActionType.DeleteCloud:
-                            DeleteCloudFile(accountInfo, cloudFile);
+                            //Redirect deletes to the delete agent 
+                            _deleteAgent.Post((CloudDeleteAction)action);
                             break;
                         case CloudActionType.RenameCloud:
                             var moveAction = (CloudMoveAction)action;
@@ -127,6 +182,82 @@ namespace Pithos.Core.Agents
             }
         }
 
+        /// <summary>
+        /// Processes cloud delete actions
+        /// </summary>
+        /// <param name="action">The delete action to execute</param>
+        /// <returns></returns>
+        /// <remarks>
+        /// When a file/folder is deleted locally, we must delete it ASAP from the server and block any download
+        /// operations that may be in progress.
+        /// <para>
+        /// A separate agent is used to process deletes because the main agent may be busy with a long operation.
+        /// </para>
+        /// </remarks>
+        private async Task ProcessDelete(CloudDeleteAction action)
+        {
+            if (action == null)
+                throw new ArgumentNullException("action");
+            if (action.AccountInfo==null)
+                throw new ArgumentException("The action.AccountInfo is empty","action");
+            Contract.EndContractBlock();
+
+            var accountInfo = action.AccountInfo;
+
+            using (log4net.ThreadContext.Stacks["NETWORK"].Push("PROCESS"))
+            {                
+                Log.InfoFormat("[ACTION] Start Processing {0}", action);
+
+                var cloudFile = action.CloudFile;
+
+                try
+                {
+                    //Acquire a lock on the deleted file to prevent uploading/downloading operations from the normal
+                    //agent
+                    using (var gate = NetworkGate.Acquire(action.LocalFile.FullName, NetworkOperation.Deleting))
+                    {
+                        // Remove any related actions from the normal agent
+                        _agent.Remove(queuedAction =>
+                                      queuedAction.CloudFile.Container == action.CloudFile.Container &&
+                                      queuedAction.CloudFile.Name == action.CloudFile.Name);
+                        // and then delete the file from the server
+                        DeleteCloudFile(accountInfo, cloudFile);
+                        Log.InfoFormat("[ACTION] End Delete {0}:{1}->{2}", action.Action, action.LocalFile,
+                                       action.CloudFile.Name);
+                    }
+                }
+                catch (WebException exc)
+                {
+                    Log.ErrorFormat("[WEB ERROR] {0} : {1} -> {2} due to exception\r\n{3}", action.Action, action.LocalFile, action.CloudFile, exc);
+                }
+                catch (OperationCanceledException)
+                {
+                    throw;
+                }
+                catch (DirectoryNotFoundException)
+                {
+                    Log.ErrorFormat("{0} : {1} -> {2}  failed because the directory was not found.\n Rescheduling a delete",
+                        action.Action, action.LocalFile, action.CloudFile);
+                    //Repost a delete action for the missing file
+                    _deleteAgent.Post(action);                    
+                }
+                catch (FileNotFoundException)
+                {
+                    Log.ErrorFormat("{0} : {1} -> {2}  failed because the file was not found.\n Rescheduling a delete",
+                        action.Action, action.LocalFile, action.CloudFile);
+                    //Post a delete action for the missing file
+                    _deleteAgent.Post(action);
+                }
+                catch (Exception exc)
+                {
+                    Log.ErrorFormat("[REQUEUE] {0} : {1} -> {2} due to exception\r\n{3}",
+                                     action.Action, action.LocalFile, action.CloudFile, exc);
+
+                    _deleteAgent.Post(action);
+                }                
+            }
+        }
+
         private async Task SyncFiles(AccountInfo accountInfo,CloudAction action)
         {
             if (accountInfo == null)
@@ -143,7 +274,7 @@ namespace Pithos.Core.Agents
 
             var localFile = action.LocalFile;
             var cloudFile = action.CloudFile;
-            var downloadPath=action.LocalFile.FullName.ToLower();
+            var downloadPath=action.LocalFile.GetProperCapitalization();
 
             var cloudHash = cloudFile.Hash.ToLower();
             var localHash = action.LocalHash.Value.ToLower();
@@ -219,7 +350,7 @@ namespace Pithos.Core.Agents
             if (cloudAction.AccountInfo==null)
                 throw new ArgumentException("The CloudAction.AccountInfo is empty","cloudAction");
             Contract.EndContractBlock();
-            
+
             //If the action targets a local file, add a treehash calculation
             if (cloudAction.LocalFile as FileInfo != null)
             {
@@ -241,7 +372,11 @@ namespace Pithos.Core.Agents
                 //The hash for a directory is the empty string
                 cloudAction.TopHash = new Lazy<string>(() => String.Empty);
             }
-            _agent.Post(cloudAction);
+            
+            if (cloudAction is CloudDeleteAction)
+                _deleteAgent.Post((CloudDeleteAction)cloudAction);
+            else
+                _agent.Post(cloudAction);
         }
 
        /* class ObjectInfoByNameComparer:IEqualityComparer<ObjectInfo>
@@ -410,7 +545,7 @@ namespace Pithos.Core.Agents
                 if (fileAgent.Exists(relativePath))
                 {
                     //If a directory object already exists, we don't need to perform any other action                    
-                    var localFile = fileAgent.GetFileInfo(relativePath);
+                    var localFile = fileAgent.GetFileSystemInfo(relativePath);
                     if (objectInfo.Content_Type == @"application/directory" && localFile is DirectoryInfo)
                         continue;
                     var state = FileState.FindByFilePath(localFile.FullName);
@@ -470,7 +605,21 @@ namespace Pithos.Core.Agents
                 throw new ArgumentException("OldCloudFile","action");
             Contract.EndContractBlock();
             
-            var newFilePath = action.LocalFile.FullName;            
+            
+            var newFilePath = action.LocalFile.FullName;
+            
+            //How do we handle concurrent renames and deletes/uploads/downloads?
+            //* A conflicting upload means that a file was renamed before it had a chance to finish uploading
+            //  This should never happen as the network agent executes only one action at a time
+            //* A conflicting download means that the file was modified on the cloud. While we can go on and complete
+            //  the rename, there may be a problem if the file is downloaded in blocks, as subsequent block requests for the 
+            //  same name will fail.
+            //  This should never happen as the network agent executes only one action at a time.
+            //* A conflicting delete can happen if the rename was followed by a delete action that didn't have the chance
+            //  to remove the rename from the queue.
+            //  We can probably ignore this case. It will result in an error which should be ignored            
+
+            
             //The local file is already renamed
             StatusKeeper.SetFileOverlayStatus(newFilePath, FileOverlayStatus.Modified);
 
@@ -479,6 +628,7 @@ namespace Pithos.Core.Agents
             var container = action.CloudFile.Container;
             
             var client = new CloudFilesClient(accountInfo);
+            //TODO: What code is returned when the source file doesn't exist?
             client.MoveObject(account, container, action.OldCloudFile.Name, container, action.CloudFile.Name);
 
             StatusKeeper.SetFileStatus(newFilePath, FileStatus.Unchanged);
@@ -502,7 +652,7 @@ namespace Pithos.Core.Agents
             using ( log4net.ThreadContext.Stacks["DeleteCloudFile"].Push("Delete"))
             {
                 var fileName= cloudFile.RelativeUrlToFilePath(accountInfo.UserName);
-                var info = fileAgent.GetFileInfo(fileName);                
+                var info = fileAgent.GetFileSystemInfo(fileName);                
                 var fullPath = info.FullName.ToLower();
 
                 StatusKeeper.SetFileOverlayStatus(fullPath, FileOverlayStatus.Modified);
@@ -518,7 +668,7 @@ namespace Pithos.Core.Agents
         }
 
         //Download a file.
-        private async Task DownloadCloudFile(AccountInfo accountInfo, ObjectInfo cloudFile , string localPath)
+        private async Task DownloadCloudFile(AccountInfo accountInfo, ObjectInfo cloudFile , string filePath)
         {
             if (accountInfo == null)
                 throw new ArgumentNullException("accountInfo");
@@ -528,12 +678,13 @@ namespace Pithos.Core.Agents
                 throw new ArgumentNullException("cloudFile");
             if (String.IsNullOrWhiteSpace(cloudFile.Container))
                 throw new ArgumentNullException("cloudFile");
-            if (String.IsNullOrWhiteSpace(localPath))
-                throw new ArgumentNullException("localPath");
-            if (!Path.IsPathRooted(localPath))
-                throw new ArgumentException("The localPath must be rooted", "localPath");
+            if (String.IsNullOrWhiteSpace(filePath))
+                throw new ArgumentNullException("filePath");
+            if (!Path.IsPathRooted(filePath))
+                throw new ArgumentException("The filePath must be rooted", "filePath");
             Contract.EndContractBlock();
-                       
+
+            var localPath = Interfaces.FileInfoExtensions.GetProperFilePathCapitalization(filePath);
             var relativeUrl = new Uri(cloudFile.Name, UriKind.Relative);
 
             var url = relativeUrl.ToString();
@@ -584,7 +735,7 @@ namespace Pithos.Core.Agents
         }
 
         //Download a small file with a single GET operation
-        private async Task DownloadEntireFileAsync(AccountInfo accountInfo, CloudFilesClient client, ObjectInfo cloudFile, Uri relativeUrl, string localPath,TreeHash serverHash)
+        private async Task DownloadEntireFileAsync(AccountInfo accountInfo, CloudFilesClient client, ObjectInfo cloudFile, Uri relativeUrl, string filePath,TreeHash serverHash)
         {
             if (client == null)
                 throw new ArgumentNullException("client");
@@ -592,12 +743,13 @@ namespace Pithos.Core.Agents
                 throw new ArgumentNullException("cloudFile");
             if (relativeUrl == null)
                 throw new ArgumentNullException("relativeUrl");
-            if (String.IsNullOrWhiteSpace(localPath))
-                throw new ArgumentNullException("localPath");
-            if (!Path.IsPathRooted(localPath))
-                throw new ArgumentException("The localPath must be rooted", "localPath");
+            if (String.IsNullOrWhiteSpace(filePath))
+                throw new ArgumentNullException("filePath");
+            if (!Path.IsPathRooted(filePath))
+                throw new ArgumentException("The localPath must be rooted", "filePath");
             Contract.EndContractBlock();
 
+            var localPath = Pithos.Interfaces.FileInfoExtensions.GetProperFilePathCapitalization(filePath);
             //If the file already exists
             if (File.Exists(localPath))
             {
@@ -624,26 +776,25 @@ namespace Pithos.Core.Agents
                 Directory.CreateDirectory(tempFolder);
 
             //Download the object to the temporary location
-            await client.GetObject(cloudFile.Account, cloudFile.Container, relativeUrl.ToString(), tempPath).ContinueWith(t =>
-            {
-                t.PropagateExceptions();
-                //Create the local folder if it doesn't exist (necessary for shared objects)
-                var localFolder = Path.GetDirectoryName(localPath);
-                if (!Directory.Exists(localFolder))
-                    Directory.CreateDirectory(localFolder);
-                //And move it to its actual location once downloading is finished
-                if (File.Exists(localPath))
-                    File.Replace(tempPath,localPath,null,true);
-                else
-                    File.Move(tempPath,localPath);
-                //Notify listeners that a local file has changed
-                StatusNotification.NotifyChangedFile(localPath);
+            await client.GetObject(cloudFile.Account, cloudFile.Container, relativeUrl.ToString(), tempPath);
 
-            });            
+            //Create the local folder if it doesn't exist (necessary for shared objects)
+            var localFolder = Path.GetDirectoryName(localPath);
+            if (!Directory.Exists(localFolder))
+                Directory.CreateDirectory(localFolder);            
+            //And move it to its actual location once downloading is finished
+            if (File.Exists(localPath))
+                File.Replace(tempPath,localPath,null,true);
+            else
+                File.Move(tempPath,localPath);
+            //Notify listeners that a local file has changed
+            StatusNotification.NotifyChangedFile(localPath);
+
+                       
         }
 
         //Download a file asynchronously using blocks
-        public async Task DownloadWithBlocks(AccountInfo accountInfo, CloudFilesClient client, ObjectInfo cloudFile, Uri relativeUrl, string localPath, TreeHash serverHash)
+        public async Task DownloadWithBlocks(AccountInfo accountInfo, CloudFilesClient client, ObjectInfo cloudFile, Uri relativeUrl, string filePath, TreeHash serverHash)
         {
             if (client == null)
                 throw new ArgumentNullException("client");
@@ -651,15 +802,16 @@ namespace Pithos.Core.Agents
                 throw new ArgumentNullException("cloudFile");
             if (relativeUrl == null)
                 throw new ArgumentNullException("relativeUrl");
-            if (String.IsNullOrWhiteSpace(localPath))
-                throw new ArgumentNullException("localPath");
-            if (!Path.IsPathRooted(localPath))
-                throw new ArgumentException("The localPath must be rooted", "localPath");
+            if (String.IsNullOrWhiteSpace(filePath))
+                throw new ArgumentNullException("filePath");
+            if (!Path.IsPathRooted(filePath))
+                throw new ArgumentException("The filePath must be rooted", "filePath");
             if (serverHash == null)
                 throw new ArgumentNullException("serverHash");
             Contract.EndContractBlock();
             
            var fileAgent = GetFileAgent(accountInfo);
+            var localPath = Interfaces.FileInfoExtensions.GetProperFilePathCapitalization(filePath);
             
             //Calculate the relative file path for the new file
             var relativePath = relativeUrl.RelativeUriToFilePath();
@@ -751,7 +903,7 @@ namespace Pithos.Core.Agents
                 }
 
 
-                var fullFileName = fileInfo.FullName;
+                var fullFileName = fileInfo.GetProperCapitalization();
                 using (var gate = NetworkGate.Acquire(fullFileName, NetworkOperation.Uploading))
                 {
                     //Abort if the file is already being uploaded or downloaded
@@ -768,15 +920,14 @@ namespace Pithos.Core.Agents
                     //If this is a read-only file, do not upload changes
                     if (info.AllowedTo == "read")
                         return;
-
-                    //WRONG: If this is a directory, there is no hash to check. ????
-                    //TODO: Check how a directory hash is calculated
+                    
+                    //TODO: Check how a directory hash is calculated -> All dirs seem to have the same hash
                     if (fileInfo is DirectoryInfo)
                     {
                         //If the directory doesn't exist the Hash property will be empty
                         if (String.IsNullOrWhiteSpace(info.Hash))
                             //Go on and create the directory
-                            client.PutObject(account, cloudFile.Container, cloudFile.Name, fileInfo.FullName, String.Empty, "application/directory");
+                            client.PutObject(account, cloudFile.Container, cloudFile.Name, fullFileName, String.Empty, "application/directory");
                     }
                     else
                     {
@@ -804,7 +955,7 @@ namespace Pithos.Core.Agents
                         //the relevant block
 
                         //First, calculate the tree hash
-                        var treeHash = await Signature.CalculateTreeHashAsync(fileInfo.FullName, accountInfo.BlockSize,
+                        var treeHash = await Signature.CalculateTreeHashAsync(fullFileName, accountInfo.BlockSize,
                                                                               accountInfo.BlockHash);
 
                         await UploadWithHashMap(accountInfo, cloudFile, fileInfo as FileInfo, cloudFile.Name, treeHash);
@@ -871,7 +1022,7 @@ namespace Pithos.Core.Agents
                 throw new ArgumentException("Invalid container","cloudFile");
             Contract.EndContractBlock();
 
-            var fullFileName = fileInfo.FullName;
+            var fullFileName = fileInfo.GetProperCapitalization();
 
             var account = cloudFile.Account ?? accountInfo.UserName;
             var container = cloudFile.Container ;
index 2ffcb32..81a52f5 100644 (file)
@@ -1,4 +1,41 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="WorkflowAgent.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.Composition;
 using System.Diagnostics;
index 59d5e70..df43910 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="FileState.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="FileState.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
@@ -125,7 +156,7 @@ namespace Pithos.Core
                         .ExecuteUpdate();
                 if (updatedEntities == 0)
                 {
-                    var newState = new FileState { FilePath = absolutePath, Id = Guid.NewGuid(), FileStatus = newStatus };
+                    var newState = new FileState { FilePath = absolutePath.ToLower(), Id = Guid.NewGuid(), FileStatus = newStatus };
                     newState.CreateAndFlush();
                 }
                 return null;
@@ -288,7 +319,7 @@ namespace Pithos.Core
 
             var fileState = new FileState
                                 {
-                                    FilePath = filePath, 
+                                    FilePath = filePath.ToLower(), 
                                     OverlayStatus = FileOverlayStatus.Unversioned, 
                                     FileStatus = FileStatus.Created,
                                     Id=Guid.NewGuid()
@@ -298,7 +329,7 @@ namespace Pithos.Core
             return fileState.UpdateHashesAsync(blockSize,algorithm);            
         }
 
-        public Task<FileState> UpdateHashesAsync(int blockSize,string algorithm)
+        public async Task<FileState> UpdateHashesAsync(int blockSize,string algorithm)
         {
             if (blockSize<=0)
                 throw new ArgumentOutOfRangeException("blockSize");
@@ -308,21 +339,17 @@ namespace Pithos.Core
             
             //Skip updating the hash for folders
             if (Directory.Exists(FilePath))
-                return Task.Factory.FromResult(this);
+                return this;
 
-            var results = Task.Factory.StartNew(() =>
+            var hash = await TaskEx.Run(() =>
             {
                 var info = new FileInfo(FilePath);
                 return info.CalculateHash(blockSize, algorithm);
             });
 
-            var state=results.Then(hash =>
-            {
-                Checksum = hash;
-                return Task.Factory.FromResult(this);
-            });
+            Checksum = hash;
             
-            return state;
+            return this;
         }
     }
 
index 6c75695..82957f6 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="IStatusService.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="IStatusService.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
@@ -35,5 +66,8 @@ namespace Pithos.Core
     {
         [OperationContract(IsOneWay=true)]
         void ShowProperties(string fileName);
+        [OperationContract(IsOneWay=true)]
+        void GotoSite(string fileName);
+
     }
 }
index cca4a07..233c157 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="JobQueue.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="JobQueue.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 5fd4c18..2815be6 100644 (file)
@@ -1,3 +1,40 @@
+// -----------------------------------------------------------------------
+// <copyright file="NetworkGate.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
@@ -10,7 +47,9 @@ namespace Pithos.Core
     {
         None,
         Uploading,
-        Downloading
+        Downloading,
+        Deleting,
+        Renaming
     }
 
     //The NetworkGate prevents starting download/uploads for files that are already in the process of downloading,
@@ -39,7 +78,8 @@ namespace Pithos.Core
             Contract.EndContractBlock();
 
             NetworkOperation operation;
-            if (NetworkState.TryGetValue(path.ToLower(), out operation))
+            var lower = path.ToLower();
+            if (NetworkState.TryGetValue(lower, out operation))
                 return operation;
             return NetworkOperation.None;
         }
@@ -74,12 +114,13 @@ namespace Pithos.Core
                 throw new ArgumentException("path must be a rooted path", "path");
             Contract.EndContractBlock();
 
-            var state = GetNetworkState(path);
+            var lower = path.ToLower();
+            var state = GetNetworkState(lower);
             //If no operation is in progress, return a NetworkGate
             return (state == NetworkOperation.None)
-                       ? new NetworkGate(path, operation)
+                       ? new NetworkGate(lower, operation)
                    //otherwise return a gate with Fail flagged
-                       : new NetworkGate(path, NetworkOperation.None);
+                       : new NetworkGate(lower, NetworkOperation.None);
         }
 
 
index 7520ed1..114c56d 100644 (file)
     <Compile Include="Agents\AgentLocator.cs" />
     <Compile Include="Agents\BlockUpdater.cs" />
     <Compile Include="Agents\CloudTransferAction.cs" />
+    <Compile Include="Agents\CollectionExtensions.cs" />
     <Compile Include="Agents\FileAgent.cs" />
     <Compile Include="Agents\FileInfoExtensions.cs" />
     <Compile Include="Agents\NetworkAgent.cs" />
index 2467066..50e096b 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.Core")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Core")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index c6e9096..bac36f0 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="AccountSettings.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="AccountSettings.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 56e0ca2..65f5703 100644 (file)
@@ -23,7 +23,7 @@ namespace Pithos.Interfaces
                 path=path.ToLower() + "\\";
             int pathLength = path.Length;            
             
-            var filePath = fileInfo.FullName;
+            var filePath = fileInfo.GetProperCapitalization();
             
             if (!filePath.StartsWith(path,StringComparison.InvariantCultureIgnoreCase))
                 throw new ArgumentException(String.Format("The path {0} doesn't contain the file {1}",path,filePath));
@@ -53,6 +53,102 @@ namespace Pithos.Interfaces
         }
 
 
+        public static string GetProperDirectoryCapitalization(string fileName)
+        {
+            if (String.IsNullOrWhiteSpace(fileName))
+                throw new ArgumentNullException("fileName");
+            if (!Path.IsPathRooted(fileName))
+                throw new ArgumentException("fileName must be an absolute path", "fileName");
+            Contract.EndContractBlock();
+
+            var dirInfo = new DirectoryInfo(fileName);
+            return dirInfo.GetProperCapitalization();
+        }
+
+        public static string GetProperCapitalization(this DirectoryInfo dirInfo)
+        {
+            if (dirInfo == null)
+                throw new ArgumentNullException("dirInfo");
+            Contract.EndContractBlock();
+
+            var parentDirInfo = dirInfo.Parent;
+            if (null == parentDirInfo)
+                return dirInfo.Name;
+            return Path.Combine(GetProperDirectoryCapitalization(parentDirInfo.FullName),
+                                parentDirInfo.GetDirectories(dirInfo.Name)[0].Name);
+        }
+
+
+        public static string GetProperFilePathCapitalization(string fileName)
+        {
+            if (String.IsNullOrWhiteSpace(fileName))
+                throw new ArgumentNullException("fileName");
+            if (!Path.IsPathRooted(fileName))
+                throw new ArgumentException("fileName must be an absolute path", "fileName");
+            Contract.EndContractBlock();
+
+
+            var fileInfo = new FileInfo(fileName);
+            return fileInfo.GetProperCapitalization();
+        }
+
+        public static string GetProperCapitalization(this FileInfo fileInfo)
+        {
+            if (fileInfo == null)
+                throw new ArgumentNullException("fileInfo");
+            Contract.EndContractBlock();
+
+
+            var dirInfo = fileInfo.Directory;
 
+            //Directory will not be null for an absolute path
+            Contract.Assume(dirInfo != null);
+
+            return Path.Combine(GetProperDirectoryCapitalization(dirInfo.FullName),
+                                dirInfo.GetFiles(fileInfo.Name)[0].Name);
+        }
+
+        public static string GetProperCapitalization(this FileSystemInfo info)
+        {
+            if (info is FileInfo)
+                return (info as FileInfo).GetProperCapitalization();
+            if (info is DirectoryInfo)
+                return (info as DirectoryInfo).GetProperCapitalization();
+            throw new NotSupportedException("Unexpected parameter type");
+        }
+
+        public static DirectoryInfo WithProperCapitalization(this DirectoryInfo dirInfo)
+        {
+            if (dirInfo==null)
+                throw new ArgumentNullException("dirInfo");
+            Contract.EndContractBlock();
+
+            var path = dirInfo.GetProperCapitalization();
+            return new DirectoryInfo(path);
+        }
+
+        public static FileInfo WithProperCapitalization(this FileInfo fileInfo)
+        {
+            if (fileInfo==null)
+                throw new ArgumentNullException("fileInfo");
+            Contract.EndContractBlock();
+
+            var path = fileInfo.GetProperCapitalization();
+            return new FileInfo(path);
+        }
+
+        public static FileSystemInfo WithProperCapitalization(this FileSystemInfo info)
+        {
+            if (info==null)
+                throw new ArgumentNullException("info");
+            Contract.EndContractBlock();
+
+            if (info is FileInfo)
+                return (info as FileInfo).WithProperCapitalization();
+            if (info is DirectoryInfo)
+                return (info as DirectoryInfo).WithProperCapitalization();
+
+            throw new NotSupportedException("Unexpected parameter type");
+        }
     }
 }
index fa56260..da44083 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="PithosSettingsData.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="PithosSettingsData.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 90bdcf7..05ba029 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.Interfaces")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Interfaces")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index 1ac5f19..a0636cb 100644 (file)
@@ -10,9 +10,9 @@ using Pithos.Network;
 [assembly: AssemblyTitle("Pithos.Network.Test")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Network.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index dbfda81..0cb2355 100644 (file)
@@ -1,4 +1,42 @@
-// **CloudFilesClient** provides a simple client interface to CloudFiles and Pithos
+// -----------------------------------------------------------------------
+// <copyright file="CloudFilesClient.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+
+// **CloudFilesClient** provides a simple client interface to CloudFiles and Pithos
 //
 // The class provides methods to upload/download files, delete files, manage containers
 
index 49eb5f4..790cd91 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.Network")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.Network")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index 5b9403f..42aee54 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="RestClient.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="RestClient.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 108732d..78fd4b1 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.ShellExtensions.Test")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.ShellExtensions.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index 9330936..fcd7536 100644 (file)
@@ -1,6 +1,40 @@
-// <copyright file="IoC.cs" company="GRNet">
-// This project is open source. Released under the XYZ license
+// -----------------------------------------------------------------------
+// <copyright file="FileContext.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
+// -----------------------------------------------------------------------
+
 
 using System.Linq;
 using Microsoft.Win32;
index 4eab378..bb87493 100644 (file)
@@ -1,6 +1,40 @@
-// <copyright file="IoC.cs" company="GRNet">
-// This project is open source. Released under the XYZ license
+// -----------------------------------------------------------------------
+// <copyright file="IoC.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
+// -----------------------------------------------------------------------
+
 
 namespace Pithos.ShellExtensions
 {
index b3db92d..e76eead 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="LogCategories.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="LogCategories.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index ab879e2..4131c41 100644 (file)
@@ -1,6 +1,40 @@
-// <copyright file="DisplayFlags.cs" company="GRNet">
-// This project is open source. Released under the XYZ license
+// -----------------------------------------------------------------------
+// <copyright file="DisplayFlags.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
+// -----------------------------------------------------------------------
+
 
 namespace Pithos.ShellExtensions.Menus
 {
index ca2740f..977e035 100644 (file)
@@ -1,4 +1,41 @@
-using System;
+// -----------------------------------------------------------------------
+// <copyright file="FileContextMenu.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+// </copyright>
+// -----------------------------------------------------------------------
+
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.Composition;
 using System.Diagnostics;
@@ -8,6 +45,7 @@ using System.Linq;
 using System.Runtime.InteropServices;
 using System.Runtime.InteropServices.ComTypes;
 using System.Text;
+using System.Threading.Tasks;
 using Pithos.ShellExtensions.Properties;
 
 namespace Pithos.ShellExtensions.Menus
@@ -149,6 +187,24 @@ namespace Pithos.ShellExtensions.Menus
 
         void OnGotoPithos(IntPtr hWnd)
         {
+            var client = PithosHost.GetCommandsClient();
+                        
+            client.BeginGotoSite(Context.CurrentFile, c =>
+            {
+                try
+                {
+                    c.AsyncWaitHandle.WaitOne();
+                    client.Close();
+                }
+                catch (Exception exc)
+                {
+                    Trace.WriteLine(exc.ToString());
+                }
+            }, null);
+
+
+            //TODO: Move this operation to the application. This is a slow process that freeze Windows Explorer
+/*
             var settings = Context.Settings;
             var activeAccount = settings.Accounts.FirstOrDefault(acc =>  Context.CurrentFile.StartsWith(acc.RootPath,StringComparison.InvariantCultureIgnoreCase));
             var address = String.Format("{0}/ui/?token={1}&user={2}",
@@ -158,6 +214,7 @@ namespace Pithos.ShellExtensions.Menus
 
             settings.Reload();
             Process.Start(address);
+*/
         }
         
 
index 09f4167..f1eae6e 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="AddedIcodOverlay.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="AddedIcodOverlay.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index 1053e09..a131499 100644 (file)
@@ -1,9 +1,41 @@
 // -----------------------------------------------------------------------
-// <copyright file="UnversionedIconOverlay.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="UnversionedIconOverlay.cs" company="GRNET">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
+
 using System.Runtime.InteropServices;
 
 namespace Pithos.ShellExtensions.Overlays
index 9c11c97..dbdddd0 100644 (file)
     <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="AsyncCtpLibrary">
+      <HintPath>..\Libraries\AsyncCtpLibrary.dll</HintPath>
+    </Reference>
     <Reference Include="log4net">
       <HintPath>..\Libraries\log4net.dll</HintPath>
     </Reference>
index 71370e8..1807cf5 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="PithosHost.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="PithosHost.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index e78ae0d..ab53631 100644 (file)
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Pithos.ShellExtensions")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("GRNet")]
 [assembly: AssemblyProduct("Pithos.ShellExtensions")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyCopyright("Copyright © GRNet 2011")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
index cd5d786..80506c2 100644 (file)
@@ -249,13 +249,21 @@ namespace Pithos.ShellExtensions.PithosService {
     [System.ServiceModel.ServiceContractAttribute(Namespace="http://PITHOS.Client.Commands", ConfigurationName="PithosService.ICommandsService")]
     public interface ICommandsService {
         
-        [System.ServiceModel.OperationContractAttribute(Action="http://PITHOS.Client.Commands/ICommandsService/ShowProperties", ReplyAction="http://PITHOS.Client.Commands/ICommandsService/ShowPropertiesResponse")]
+        [System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://PITHOS.Client.Commands/ICommandsService/ShowProperties")]
         void ShowProperties(string fileName);
         
-        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://PITHOS.Client.Commands/ICommandsService/ShowProperties", ReplyAction="http://PITHOS.Client.Commands/ICommandsService/ShowPropertiesResponse")]
+        [System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://PITHOS.Client.Commands/ICommandsService/ShowProperties")]
         System.IAsyncResult BeginShowProperties(string fileName, System.AsyncCallback callback, object asyncState);
         
         void EndShowProperties(System.IAsyncResult result);
+        
+        [System.ServiceModel.OperationContractAttribute(IsOneWay=true, Action="http://PITHOS.Client.Commands/ICommandsService/GotoSite")]
+        void GotoSite(string fileName);
+        
+        [System.ServiceModel.OperationContractAttribute(IsOneWay=true, AsyncPattern=true, Action="http://PITHOS.Client.Commands/ICommandsService/GotoSite")]
+        System.IAsyncResult BeginGotoSite(string fileName, System.AsyncCallback callback, object asyncState);
+        
+        void EndGotoSite(System.IAsyncResult result);
     }
     
     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -272,6 +280,12 @@ namespace Pithos.ShellExtensions.PithosService {
         
         private System.Threading.SendOrPostCallback onShowPropertiesCompletedDelegate;
         
+        private BeginOperationDelegate onBeginGotoSiteDelegate;
+        
+        private EndOperationDelegate onEndGotoSiteDelegate;
+        
+        private System.Threading.SendOrPostCallback onGotoSiteCompletedDelegate;
+        
         public CommandsServiceClient() {
         }
         
@@ -293,6 +307,8 @@ namespace Pithos.ShellExtensions.PithosService {
         
         public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> ShowPropertiesCompleted;
         
+        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> GotoSiteCompleted;
+        
         public void ShowProperties(string fileName) {
             base.Channel.ShowProperties(fileName);
         }
@@ -341,5 +357,54 @@ namespace Pithos.ShellExtensions.PithosService {
             base.InvokeAsync(this.onBeginShowPropertiesDelegate, new object[] {
                         fileName}, this.onEndShowPropertiesDelegate, this.onShowPropertiesCompletedDelegate, userState);
         }
+        
+        public void GotoSite(string fileName) {
+            base.Channel.GotoSite(fileName);
+        }
+        
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+        public System.IAsyncResult BeginGotoSite(string fileName, System.AsyncCallback callback, object asyncState) {
+            return base.Channel.BeginGotoSite(fileName, callback, asyncState);
+        }
+        
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+        public void EndGotoSite(System.IAsyncResult result) {
+            base.Channel.EndGotoSite(result);
+        }
+        
+        private System.IAsyncResult OnBeginGotoSite(object[] inValues, System.AsyncCallback callback, object asyncState) {
+            string fileName = ((string)(inValues[0]));
+            return this.BeginGotoSite(fileName, callback, asyncState);
+        }
+        
+        private object[] OnEndGotoSite(System.IAsyncResult result) {
+            this.EndGotoSite(result);
+            return null;
+        }
+        
+        private void OnGotoSiteCompleted(object state) {
+            if ((this.GotoSiteCompleted != null)) {
+                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
+                this.GotoSiteCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
+            }
+        }
+        
+        public void GotoSiteAsync(string fileName) {
+            this.GotoSiteAsync(fileName, null);
+        }
+        
+        public void GotoSiteAsync(string fileName, object userState) {
+            if ((this.onBeginGotoSiteDelegate == null)) {
+                this.onBeginGotoSiteDelegate = new BeginOperationDelegate(this.OnBeginGotoSite);
+            }
+            if ((this.onEndGotoSiteDelegate == null)) {
+                this.onEndGotoSiteDelegate = new EndOperationDelegate(this.OnEndGotoSite);
+            }
+            if ((this.onGotoSiteCompletedDelegate == null)) {
+                this.onGotoSiteCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGotoSiteCompleted);
+            }
+            base.InvokeAsync(this.onBeginGotoSiteDelegate, new object[] {
+                        fileName}, this.onEndGotoSiteDelegate, this.onGotoSiteCompletedDelegate, userState);
+        }
     }
 }
index 342cb64..5887cbf 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://PITHOS.Client.Status" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:i1="http://PITHOS.Client.Settings" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i2="http://PITHOS.Client.Commands" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="StatusService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i0="http://PITHOS.Client.Status" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:i1="http://PITHOS.Client.Settings" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:i2="http://PITHOS.Client.Commands" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="StatusService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsp:Policy wsu:Id="NetNamedPipeBinding_IStatusService_policy">
     <wsp:ExactlyOne>
       <wsp:All>
       <wsdl:input>
         <soap12:body use="literal" />
       </wsdl:input>
-      <wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="GotoSite">
+      <soap12:operation soapAction="http://PITHOS.Client.Commands/ICommandsService/GotoSite" style="document" />
+      <wsdl:input>
         <soap12:body use="literal" />
-      </wsdl:output>
+      </wsdl:input>
     </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="StatusService">
index 5fe7bb4..0d30957 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Status" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Status" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Status" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Status" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
     <xsd:schema targetNamespace="http://PITHOS.Client.Status/Imports">
       <xsd:import schemaLocation="http://localhost:30000/pithos/mex?xsd=xsd0" namespace="http://PITHOS.Client.Status" />
index 12c0fc4..7c18b5f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Settings" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Settings" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Settings" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Settings" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
     <xsd:schema targetNamespace="http://PITHOS.Client.Settings/Imports">
       <xsd:import schemaLocation="http://localhost:30000/pithos/mex?xsd=xsd3" namespace="http://PITHOS.Client.Settings" />
index 5db3a49..6dff636 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Commands" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Commands" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://PITHOS.Client.Commands" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://PITHOS.Client.Commands" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
     <xsd:schema targetNamespace="http://PITHOS.Client.Commands/Imports">
       <xsd:import schemaLocation="http://localhost:30000/pithos/mex?xsd=xsd5" namespace="http://PITHOS.Client.Commands" />
   <wsdl:message name="ICommandsService_ShowProperties_InputMessage">
     <wsdl:part name="parameters" element="tns:ShowProperties" />
   </wsdl:message>
-  <wsdl:message name="ICommandsService_ShowProperties_OutputMessage">
-    <wsdl:part name="parameters" element="tns:ShowPropertiesResponse" />
+  <wsdl:message name="ICommandsService_GotoSite_InputMessage">
+    <wsdl:part name="parameters" element="tns:GotoSite" />
   </wsdl:message>
   <wsdl:portType name="ICommandsService">
     <wsdl:operation name="ShowProperties">
       <wsdl:input wsaw:Action="http://PITHOS.Client.Commands/ICommandsService/ShowProperties" message="tns:ICommandsService_ShowProperties_InputMessage" />
-      <wsdl:output wsaw:Action="http://PITHOS.Client.Commands/ICommandsService/ShowPropertiesResponse" message="tns:ICommandsService_ShowProperties_OutputMessage" />
+    </wsdl:operation>
+    <wsdl:operation name="GotoSite">
+      <wsdl:input wsaw:Action="http://PITHOS.Client.Commands/ICommandsService/GotoSite" message="tns:ICommandsService_GotoSite_InputMessage" />
     </wsdl:operation>
   </wsdl:portType>
 </wsdl:definitions>
\ No newline at end of file
index cf51df4..c174d46 100644 (file)
@@ -75,7 +75,7 @@
       <xs:element minOccurs="0" name="IsActive" type="xs:boolean" />
       <xs:element minOccurs="0" name="RootPath" nillable="true" type="xs:string" />
       <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="SelectiveFolders" nillable="true" type="q1:ArrayOfanyType" />
-      <xs:element minOccurs="0" name="UsePithos" type="xs:boolean" />
+      <xs:element minOccurs="0" name="ServerUrl" nillable="true" type="xs:string" />
     </xs:sequence>
   </xs:complexType>
   <xs:element name="AccountSettings" nillable="true" type="tns:AccountSettings" />
index a66c246..429824d 100644 (file)
@@ -7,9 +7,11 @@
       </xs:sequence>
     </xs:complexType>
   </xs:element>
-  <xs:element name="ShowPropertiesResponse">
+  <xs:element name="GotoSite">
     <xs:complexType>
-      <xs:sequence />
+      <xs:sequence>
+        <xs:element minOccurs="0" name="fileName" nillable="true" type="xs:string" />
+      </xs:sequence>
     </xs:complexType>
   </xs:element>
 </xs:schema>
\ No newline at end of file
index 5d315d8..259982d 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="ShellSettings.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="ShellSettings.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------
 
index f3f6b46..d65ea10 100644 (file)
@@ -1,6 +1,37 @@
 // -----------------------------------------------------------------------
-// <copyright file="ShellStatusChecker.cs" company="Microsoft">
-// TODO: Update copyright text.
+// <copyright file="ShellStatusChecker.cs" company="GRNet">
+// Copyright 2011 GRNET S.A. All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
 // </copyright>
 // -----------------------------------------------------------------------