All projects are now signed.

Updated to the newest version of LightDataModel.
Switched from duplicity to duplicati, this runs a bit faster.
Now supports authentication on network shares (windows only).

git-svn-id: https://duplicati.googlecode.com/svn/trunk@66 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
kenneth.skovhede@gmail.com
2009-01-15 19:42:14 +00:00
parent ea82284a78
commit 135caf4164
70 changed files with 1270 additions and 482 deletions
+61 -1
View File
@@ -7,7 +7,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WizardForm", "WizardForm\Wi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati", "Duplicati\GUI\Duplicati.csproj", "{1470F75F-D364-4010-91D0-FD4DDA1C5159}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Core", "Duplicati\Core\Duplicati.Core.csproj", "{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Core", "Duplicati\Library\Core\Duplicati.Library.Core.csproj", "{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Main", "Duplicati\Library\Main\Duplicati.Library.Main.csproj", "{10D2D1B7-C664-41D8-9B3A-00040C3D421B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.BackendInterface", "Duplicati\Library\Backend\BackendInterface\Duplicati.Library.Backend.BackendInterface.csproj", "{994F3D0A-E91E-4EEE-80EE-064485E09909}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.BackendLoader", "Duplicati\Library\Backend\BackendLoader\Duplicati.Library.Backend.BackendLoader.csproj", "{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.File", "Duplicati\Library\Backend\File\Duplicati.Library.Backend.File.csproj", "{FC9B7611-836F-4127-8B44-A7C31F506807}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.FTP", "Duplicati\Library\Backend\FTP\Duplicati.Library.Backend.FTP.csproj", "{F61679A9-E5DE-468A-B5A4-05F92D0143D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.SSH", "Duplicati\Library\Backend\SSH\Duplicati.Library.Backend.SSH.csproj", "{6BA21DCB-1701-4936-B177-3B6D4DE3474E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Compression", "Duplicati\Library\Compression\Duplicati.Library.Compression.csproj", "{19ECCE09-B5EB-406C-8C57-BAC66997D469}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Encryption", "Duplicati\Library\Encryption\Duplicati.Library.Encryption.csproj", "{94484FDB-2EFA-4CF0-9BE6-A561157B4F87}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.SharpRSync", "Duplicati\Library\SharpRSync\Duplicati.Library.SharpRSync.csproj", "{47FE73E1-0832-44F7-96B9-2580273206C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Logging", "Duplicati\Library\Logging\Duplicati.Library.Logging.csproj", "{D10A5FC0-11B4-4E70-86AA-8AEA52BD9798}"
EndProject
Global
GlobalSection(SubversionScc) = preSolution
@@ -35,6 +55,46 @@ Global
{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}.Release|Any CPU.Build.0 = Release|Any CPU
{10D2D1B7-C664-41D8-9B3A-00040C3D421B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10D2D1B7-C664-41D8-9B3A-00040C3D421B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10D2D1B7-C664-41D8-9B3A-00040C3D421B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10D2D1B7-C664-41D8-9B3A-00040C3D421B}.Release|Any CPU.Build.0 = Release|Any CPU
{994F3D0A-E91E-4EEE-80EE-064485E09909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{994F3D0A-E91E-4EEE-80EE-064485E09909}.Debug|Any CPU.Build.0 = Debug|Any CPU
{994F3D0A-E91E-4EEE-80EE-064485E09909}.Release|Any CPU.ActiveCfg = Release|Any CPU
{994F3D0A-E91E-4EEE-80EE-064485E09909}.Release|Any CPU.Build.0 = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Any CPU.Build.0 = Release|Any CPU
{FC9B7611-836F-4127-8B44-A7C31F506807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC9B7611-836F-4127-8B44-A7C31F506807}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC9B7611-836F-4127-8B44-A7C31F506807}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC9B7611-836F-4127-8B44-A7C31F506807}.Release|Any CPU.Build.0 = Release|Any CPU
{F61679A9-E5DE-468A-B5A4-05F92D0143D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F61679A9-E5DE-468A-B5A4-05F92D0143D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F61679A9-E5DE-468A-B5A4-05F92D0143D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F61679A9-E5DE-468A-B5A4-05F92D0143D2}.Release|Any CPU.Build.0 = Release|Any CPU
{6BA21DCB-1701-4936-B177-3B6D4DE3474E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BA21DCB-1701-4936-B177-3B6D4DE3474E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA21DCB-1701-4936-B177-3B6D4DE3474E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA21DCB-1701-4936-B177-3B6D4DE3474E}.Release|Any CPU.Build.0 = Release|Any CPU
{19ECCE09-B5EB-406C-8C57-BAC66997D469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19ECCE09-B5EB-406C-8C57-BAC66997D469}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19ECCE09-B5EB-406C-8C57-BAC66997D469}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19ECCE09-B5EB-406C-8C57-BAC66997D469}.Release|Any CPU.Build.0 = Release|Any CPU
{94484FDB-2EFA-4CF0-9BE6-A561157B4F87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94484FDB-2EFA-4CF0-9BE6-A561157B4F87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94484FDB-2EFA-4CF0-9BE6-A561157B4F87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94484FDB-2EFA-4CF0-9BE6-A561157B4F87}.Release|Any CPU.Build.0 = Release|Any CPU
{47FE73E1-0832-44F7-96B9-2580273206C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47FE73E1-0832-44F7-96B9-2580273206C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47FE73E1-0832-44F7-96B9-2580273206C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47FE73E1-0832-44F7-96B9-2580273206C3}.Release|Any CPU.Build.0 = Release|Any CPU
{D10A5FC0-11B4-4E70-86AA-8AEA52BD9798}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D10A5FC0-11B4-4E70-86AA-8AEA52BD9798}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D10A5FC0-11B4-4E70-86AA-8AEA52BD9798}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D10A5FC0-11B4-4E70-86AA-8AEA52BD9798}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.CommandLine</RootNamespace>
<AssemblyName>Duplicati.CommandLine</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -72,6 +74,9 @@
<Name>Duplicati.Library.SharpRSync</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
+1 -1
View File
@@ -31,7 +31,7 @@ namespace Duplicati.GUI
{
public partial class ApplicationSetup : Form
{
private IDataFetcher m_connection;
private IDataFetcherCached m_connection;
private ApplicationSettings m_settings;
private bool m_isUpdating = false;
+10 -29
View File
@@ -1,51 +1,32 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>ApplicationSetting</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class ApplicationSetting : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("ApplicationSetting")]
public partial class ApplicationSetting : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = -9223372036854775808;
[AutoIncrement, PrimaryKey, DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[DatabaseField("Name")]
private System.String m_Name = "";
[DatabaseField("Value")]
private System.String m_Value = "";
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
#endregion
#region " properties "
public System.Int64 ID
+3 -3
View File
@@ -80,12 +80,12 @@ namespace Duplicati.Datamodel.Backends
public string GetDestinationPath()
{
return "ftp://" + this.Username + "@" + this.Host + "/" + this.Folder;
return "ftp://" + this.Username + "@" + this.Host + ":" + this.Port + "/" + this.Folder;
}
public void GetExtraSettings(List<string> args, System.Collections.Specialized.StringDictionary env)
public void GetOptions(Dictionary<string, string> options)
{
env["FTP_PASSWORD"] = this.Password;
options["ftp_password"] = this.Password;
}
public string FriendlyName { get { return "FTP host"; } }
+8 -5
View File
@@ -69,14 +69,17 @@ namespace Duplicati.Datamodel.Backends
public string GetDestinationPath()
{
return "file://" + this.DestinationFolder;
if (!string.IsNullOrEmpty(this.Username))
return "file://" + this.Username + "@" + this.DestinationFolder;
else
return "file://" + this.DestinationFolder;
}
public void GetExtraSettings(List<string> args, StringDictionary env)
public void GetOptions(Dictionary<string, string> options)
{
//TODO: Deal with authentication
args.Add("--time-separator");
args.Add(this.TimeSeparator);
options["time-separator"] = this.TimeSeparator;
if (!string.IsNullOrEmpty(this.Password))
options["ftp_password"] = this.Password;
}
public string FriendlyName { get { return "External drive or folder"; } }
+1 -1
View File
@@ -27,7 +27,7 @@ namespace Duplicati.Datamodel.Backends
public interface IBackend
{
string GetDestinationPath();
void GetExtraSettings(List<string> args, StringDictionary env);
void GetOptions(Dictionary<string, string> options);
string FriendlyName { get; }
string SystemName { get; }
void SetService();
+3 -3
View File
@@ -97,10 +97,10 @@ namespace Duplicati.Datamodel.Backends
return "s3://" + host + "/" + this.BucketName + (string.IsNullOrEmpty(this.Prefix) ? "" : "/" + this.Prefix);
}
public void GetExtraSettings(List<string> args, StringDictionary env)
public void GetOptions(Dictionary<string, string> options)
{
env["AWS_ACCESS_ID"] = this.AccessID;
env["AWS_ACCESS_KEY"] = this.AccessKey;
options["aws_access_id"] = this.AccessID;
options["aws_access_key"] = this.AccessKey;
}
public string FriendlyName { get { return "Amazon S3"; } }
+9 -3
View File
@@ -98,12 +98,18 @@ namespace Duplicati.Datamodel.Backends
return "ssh://" + this.Username + "@" + this.Host + "/" + this.Folder;
}
public void GetExtraSettings(List<string> args, StringDictionary env)
public void GetOptions(Dictionary<string, string> options)
{
if (!this.Passwordless)
args.Add("--ssh-askpass");
options.Add("ssh-askpass", "");
else
env["FTP_PASSWORD"] = this.Password;
options["ftp_password"] = this.Password;
if (!options.ContainsKey("ssh-options"))
options["ssh-options"] = "";
if (this.Port != 22)
options["ssh-options"] += "-P " + this.Port;
}
public string FriendlyName { get { return "SSH host"; } }
+11 -29
View File
@@ -1,52 +1,34 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>CommandQueue</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class CommandQueue : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("CommandQueue")]
public partial class CommandQueue : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
[AutoIncrement, PrimaryKey, DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[DatabaseField("Command")]
private System.String m_Command = "";
[DatabaseField("Argument")]
private System.String m_Argument = "";
[DatabaseField("Completed")]
private System.Boolean m_Completed = false;
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
#endregion
#region " properties "
public System.Int64 ID
+1 -115
View File
@@ -1,115 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon />
<AssemblyKeyContainerName />
<AssemblyName>Datamodel</AssemblyName>
<AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<RootNamespace>Duplicati.Datamodel</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject />
<FileUpgradeFlags />
<UpgradeBackupLocation />
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="LightDatamodel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c7a68962c12dce64, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\LightDatamodel.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.XML">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Backends\File.cs" />
<Compile Include="Backends\IBackend.cs" />
<Compile Include="Backends\S3.cs" />
<Compile Include="Backends\SSH.cs" />
<Compile Include="SettingsHelper.cs" />
<Compile Include="Task.Extension.cs" />
<Compile Include="Task.cs" />
<Compile Include="Schedule.cs" />
<Compile Include="TaskSetting.cs" />
<Compile Include="CommandQueue.cs" />
<Compile Include="Log.cs" />
<Compile Include="LogBlob.cs" />
<Compile Include="ApplicationSettings.cs" />
<Compile Include="ApplicationSetting.cs" />
</ItemGroup>
<ItemGroup>
<None Include="LightDatamodel.snk" />
<Compile Include="Backends\FTP.cs" />
<Compile Include="Log.Extension.cs" />
<Compile Include="LogBlob.Extension.cs" />
<Compile Include="Utillity.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LightDataModel.Mapping.xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Datamodel</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Duplicati.Datamodel</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="LightDatamodel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c7a68962c12dce64, processorArchitecture=MSIL"><SpecificVersion>False</SpecificVersion><HintPath>.\LightDatamodel.dll</HintPath></Reference><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Backends\File.cs" /><Compile Include="Backends\IBackend.cs" /><Compile Include="Backends\S3.cs" /><Compile Include="Backends\SSH.cs" /><Compile Include="SettingsHelper.cs" /><Compile Include="Task.Extension.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><Compile Include="ApplicationSettings.cs" /><Compile Include="ApplicationSetting.cs" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /><Compile Include="Backends\FTP.cs" /><Compile Include="Log.Extension.cs" /><Compile Include="LogBlob.Extension.cs" /><Compile Include="Schedule.Extension.cs" /><Compile Include="Utillity.cs" /></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Duplicati</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Datamodel.Duplicati</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference><Reference Include="LightDatamodel"><Name>LightDatamodel</Name><HintPath>.\LightDatamodel.dll</HintPath></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><EmbeddedResource Include="C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\LightDataModel.Mapping.xml" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
<?xml version="1.0" encoding="UTF-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Duplicati</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Datamodel.Duplicati</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference><Reference Include="LightDatamodel"><Name>LightDatamodel</Name><HintPath>.\LightDatamodel.dll</HintPath></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><EmbeddedResource Include="C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\LightDataModel.Mapping.xml" /><Compile Include="ApplicationSetting.cs" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
@@ -1,58 +1,549 @@
<mapping>
<class tablename="Task" classname="Task">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Service" fieldname="m_Service" propertyname="Service" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Encryptionkey" fieldname="m_Encryptionkey" propertyname="Encryptionkey" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Signaturekey" fieldname="m_Signaturekey" propertyname="Signaturekey" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="SourcePath" fieldname="m_SourcePath" propertyname="SourcePath" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="ScheduleID" fieldname="m_ScheduleID" propertyname="ScheduleID" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="-9223372036854775808" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<referencecolumn reverse_table="Schedule" reverse_column="ID" reverse_property="Tasks" column="ScheduleID" property="Schedule" iscollection="true" />
</class>
<class tablename="Schedule" classname="Schedule">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Name" fieldname="m_Name" propertyname="Name" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Path" fieldname="m_Path" propertyname="Path" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="When" fieldname="m_When" propertyname="When" isAutoGenerated="False" isPrimaryKey="False" datatype="System.DateTime" nullvalue="01-01-0001 00:00:00" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Repeat" fieldname="m_Repeat" propertyname="Repeat" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Weekdays" fieldname="m_Weekdays" propertyname="Weekdays" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="KeepFull" fieldname="m_KeepFull" propertyname="KeepFull" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="0" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="KeepTime" fieldname="m_KeepTime" propertyname="KeepTime" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="FullAfter" fieldname="m_FullAfter" propertyname="FullAfter" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
</class>
<class tablename="TaskSetting" classname="TaskSetting">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="TaskID" fieldname="m_TaskID" propertyname="TaskID" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="-9223372036854775808" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Name" fieldname="m_Name" propertyname="Name" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Value" fieldname="m_Value" propertyname="Value" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<referencecolumn reverse_table="Task" reverse_column="ID" reverse_property="TaskSettings" column="TaskID" property="Task" iscollection="true" />
</class>
<class tablename="CommandQueue" classname="CommandQueue">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Command" fieldname="m_Command" propertyname="Command" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Argument" fieldname="m_Argument" propertyname="Argument" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Completed" fieldname="m_Completed" propertyname="Completed" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Boolean" nullvalue="False" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
</class>
<class tablename="Log" classname="Log">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="TaskID" fieldname="m_TaskID" propertyname="TaskID" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="0" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="EndTime" fieldname="m_EndTime" propertyname="EndTime" isAutoGenerated="False" isPrimaryKey="False" datatype="System.DateTime" nullvalue="01-01-0001 00:00:00" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="BeginTime" fieldname="m_BeginTime" propertyname="BeginTime" isAutoGenerated="False" isPrimaryKey="False" datatype="System.DateTime" nullvalue="01-01-0001 00:00:00" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Action" fieldname="m_Action" propertyname="Action" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="SubAction" fieldname="m_SubAction" propertyname="SubAction" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Transfersize" fieldname="m_Transfersize" propertyname="Transfersize" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="0" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="ParsedStatus" fieldname="m_ParsedStatus" propertyname="ParsedStatus" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="LogBlobID" fieldname="m_LogBlobID" propertyname="LogBlobID" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Int64" nullvalue="0" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<referencecolumn reverse_table="Task" reverse_column="ID" reverse_property="Logs" column="TaskID" property="OwnerTask" iscollection="true" />
<referencecolumn reverse_table="LogBlob" reverse_column="ID" reverse_property="OwnerLog" column="LogBlobID" property="LogBlob" iscollection="false" />
</class>
<class tablename="LogBlob" classname="LogBlob">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="0" ignoreWithInsert="True" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Data" fieldname="m_Data" propertyname="Data" isAutoGenerated="False" isPrimaryKey="False" datatype="System.Byte[]" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
</class>
<class tablename="ApplicationSetting" classname="ApplicationSetting">
<column columnname="ID" fieldname="m_ID" propertyname="ID" isAutoGenerated="True" isPrimaryKey="True" datatype="System.Int64" nullvalue="-9223372036854775808" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Name" fieldname="m_Name" propertyname="Name" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
<column columnname="Value" fieldname="m_Value" propertyname="Value" isAutoGenerated="False" isPrimaryKey="False" datatype="System.String" nullvalue="" ignoreWithInsert="False" ignoreWithUpdate="False" ignoreWithSelect="False" />
</class>
<ignoredclass tablename="Version" />
</mapping>
<?xml version="1.0"?>
<ConfigurationContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m_tables>
<Table>
<Name>Task</Name>
<Classname>Task</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Service</Name>
<Fieldname>Service</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Encryptionkey</Name>
<Fieldname>Encryptionkey</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Signaturekey</Name>
<Fieldname>Signaturekey</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>SourcePath</Name>
<Fieldname>SourcePath</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>ScheduleID</Name>
<Fieldname>ScheduleID</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations>
<Relation>
<Name>TaskSchedule</Name>
<Databasefield>ScheduleID</Databasefield>
<Propertyname>Schedule</Propertyname>
<Type>OneToMany</Type>
<ReverseTablename>Schedule</ReverseTablename>
<ReverseDatabasefield>ID</ReverseDatabasefield>
<ReversePropertyname>Tasks</ReversePropertyname>
<Tablename>Task</Tablename>
</Relation>
</Relations>
</Table>
<Table>
<Name>Schedule</Name>
<Classname>Schedule</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Name</Name>
<Fieldname>Name</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Path</Name>
<Fieldname>Path</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.DateTime</Typename>
<Name>When</Name>
<Fieldname>When</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Repeat</Name>
<Fieldname>Repeat</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Weekdays</Name>
<Fieldname>Weekdays</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>KeepFull</Name>
<Fieldname>KeepFull</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>KeepTime</Name>
<Fieldname>KeepTime</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>FullAfter</Name>
<Fieldname>FullAfter</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations />
</Table>
<Table>
<Name>TaskSetting</Name>
<Classname>TaskSetting</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>TaskID</Name>
<Fieldname>TaskID</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Name</Name>
<Fieldname>Name</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Value</Name>
<Fieldname>Value</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations>
<Relation>
<Name>TaskSettingTask</Name>
<Databasefield>TaskID</Databasefield>
<Propertyname>Task</Propertyname>
<Type>OneToMany</Type>
<ReverseTablename>Task</ReverseTablename>
<ReverseDatabasefield>ID</ReverseDatabasefield>
<ReversePropertyname>TaskSettings</ReversePropertyname>
<Tablename>TaskSetting</Tablename>
</Relation>
</Relations>
</Table>
<Table>
<Name>CommandQueue</Name>
<Classname>CommandQueue</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Command</Name>
<Fieldname>Command</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Argument</Name>
<Fieldname>Argument</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.Boolean</Typename>
<Name>Completed</Name>
<Fieldname>Completed</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations />
</Table>
<Table>
<Name>Log</Name>
<Classname>Log</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>TaskID</Name>
<Fieldname>TaskID</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.DateTime</Typename>
<Name>EndTime</Name>
<Fieldname>EndTime</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.DateTime</Typename>
<Name>BeginTime</Name>
<Fieldname>BeginTime</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Action</Name>
<Fieldname>Action</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>SubAction</Name>
<Fieldname>SubAction</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>Transfersize</Name>
<Fieldname>Transfersize</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>ParsedStatus</Name>
<Fieldname>ParsedStatus</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>LogBlobID</Name>
<Fieldname>LogBlobID</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations>
<Relation>
<Name>LogTask</Name>
<Databasefield>TaskID</Databasefield>
<Propertyname>OwnerTask</Propertyname>
<Type>OneToMany</Type>
<ReverseTablename>Task</ReverseTablename>
<ReverseDatabasefield>ID</ReverseDatabasefield>
<ReversePropertyname>Logs</ReversePropertyname>
<Tablename>Log</Tablename>
</Relation>
<Relation>
<Name>LogBlob</Name>
<Databasefield>LogBlobID</Databasefield>
<Propertyname>Blob</Propertyname>
<Type>OneToOne</Type>
<ReverseTablename>LogBlob</ReverseTablename>
<ReverseDatabasefield>ID</ReverseDatabasefield>
<ReversePropertyname>Log</ReversePropertyname>
<Tablename>Log</Tablename>
</Relation>
</Relations>
</Table>
<Table>
<Name>LogBlob</Name>
<Classname>LogBlob</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.Byte[]</Typename>
<Name>Data</Name>
<Fieldname>Data</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations />
</Table>
<Table>
<Name>Version</Name>
<Classname>Version</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.Int64</Typename>
<Name>Version</Name>
<Fieldname>Version</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>true</Ignore>
<Relations />
</Table>
<Table>
<Name>ApplicationSetting</Name>
<Classname>ApplicationSetting</Classname>
<PrimaryKey>ID</PrimaryKey>
<Columns>
<Column>
<Typename>System.Int64</Typename>
<Name>ID</Name>
<Fieldname>ID</Fieldname>
<Autonumber>true</Autonumber>
<PrimaryKey>true</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>true</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Name</Name>
<Fieldname>Name</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
<Column>
<Typename>System.String</Typename>
<Name>Value</Name>
<Fieldname>Value</Fieldname>
<Autonumber>false</Autonumber>
<PrimaryKey>false</PrimaryKey>
<IgnoreWithSelect>false</IgnoreWithSelect>
<IgnoreWithUpdate>false</IgnoreWithUpdate>
<IgnoreWithInsert>false</IgnoreWithInsert>
<Index>false</Index>
</Column>
</Columns>
<Ignore>false</Ignore>
<Relations />
</Table>
</m_tables>
</ConfigurationContainer>
Binary file not shown.
Binary file not shown.
+26 -37
View File
@@ -1,55 +1,42 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>Log</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class Log : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("Log")]
public partial class Log : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
private System.Int64 m_TaskID = 0;
[AutoIncrement, PrimaryKey, DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[Relation("LogTask", typeof(Task), "ID"), DatabaseField("TaskID")]
private System.Int64 m_TaskID = long.MinValue;
[DatabaseField("EndTime")]
private System.DateTime m_EndTime = new System.DateTime(1, 1, 1);
[DatabaseField("BeginTime")]
private System.DateTime m_BeginTime = new System.DateTime(1, 1, 1);
[DatabaseField("Action")]
private System.String m_Action = "";
[DatabaseField("SubAction")]
private System.String m_SubAction = "";
private System.Int64 m_Transfersize = 0;
[DatabaseField("Transfersize")]
private System.Int64 m_Transfersize = long.MinValue;
[DatabaseField("ParsedStatus")]
private System.String m_ParsedStatus = "";
private System.Int64 m_LogBlobID = 0;
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
[Relation("LogBlob", typeof(LogBlob), "ID"), DatabaseField("LogBlobID")]
private System.Int64 m_LogBlobID = long.MinValue;
#endregion
#region " properties "
@@ -112,16 +99,18 @@ namespace Duplicati.Datamodel
#region " referenced properties "
[Affects(typeof(Task))]
public Task OwnerTask
{
get{ return base.RelationManager.GetReferenceObject<Task>("OwnerTask", this); }
set{ base.RelationManager.SetReferenceObject<Task>("OwnerTask", this, value); }
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<Task>("LogTask", this); }
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("LogTask", this, value); }
}
public LogBlob LogBlob
[Affects(typeof(LogBlob))]
public LogBlob Blob
{
get{ return base.RelationManager.GetReferenceObject<LogBlob>("LogBlob", this); }
set{ base.RelationManager.SetReferenceObject<LogBlob>("LogBlob", this, value); }
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<LogBlob>("LogBlob", this); }
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("LogBlob", this, value); }
}
#endregion
+13 -32
View File
@@ -1,50 +1,30 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>LogBlob</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class LogBlob : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("LogBlob")]
public partial class LogBlob : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
[AutoIncrement, PrimaryKey, Relation("LogBlob", typeof(Log), "LogBlobID", false), DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[DatabaseField("Data")]
private System.Byte[] m_Data = null;
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
#endregion
#region " properties "
public System.Int64 ID
@@ -63,10 +43,11 @@ namespace Duplicati.Datamodel
#region " referenced properties "
public Log OwnerLog
[Affects(typeof(Log))]
public Log Log
{
get{ return base.RelationManager.GetReferenceObject<Log>("LogBlob", this); }
set{ base.RelationManager.SetReferenceObject<Log>("LogBlob", this, value); }
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<Log>("LogBlob", this); }
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("LogBlob", this, value); }
}
#endregion
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Duplicati.Datamodel
{
public partial class Schedule
{
public bool ExistsInDb
{
get { return this.ID > 0; }
}
}
}
+19 -34
View File
@@ -1,57 +1,44 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>Schedule</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class Schedule : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("Schedule")]
public partial class Schedule : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
[AutoIncrement, PrimaryKey, Relation("TaskSchedule", typeof(Task), "ScheduleID", false), DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[DatabaseField("Name")]
private System.String m_Name = "";
[DatabaseField("Path")]
private System.String m_Path = "";
[DatabaseField("When")]
private System.DateTime m_When = new System.DateTime(1, 1, 1);
[DatabaseField("Repeat")]
private System.String m_Repeat = "";
[DatabaseField("Weekdays")]
private System.String m_Weekdays = "";
private System.Int64 m_KeepFull = 0;
[DatabaseField("KeepFull")]
private System.Int64 m_KeepFull = long.MinValue;
[DatabaseField("KeepTime")]
private System.String m_KeepTime = "";
[DatabaseField("FullAfter")]
private System.String m_FullAfter = "";
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
#endregion
#region " properties "
public System.Int64 ID
@@ -112,14 +99,12 @@ namespace Duplicati.Datamodel
#region " referenced properties "
private System.Collections.Generic.IList<Task> m_Tasks;
[Affects(typeof(Task))]
public System.Collections.Generic.IList<Task> Tasks
{
get
{
if (m_Tasks == null)
m_Tasks = base.RelationManager.GetReferenceCollection<Task>("Schedule", this);
return m_Tasks;
return ((DataFetcherWithRelations)m_dataparent).GetRelatedObjects<Task>("TaskSchedule", this);
}
}
Binary file not shown.
+7 -2
View File
@@ -66,9 +66,14 @@ namespace Duplicati.Datamodel
return this.Backend.GetDestinationPath();
}
public void GetExtraSettings(List<string> args, StringDictionary env)
public void GetOptions(Dictionary<string, string> options)
{
this.Backend.GetExtraSettings(args, env);
this.Backend.GetOptions(options);
}
public bool ExistsInDb
{
get { return this.ID > 0; }
}
}
+21 -40
View File
@@ -1,52 +1,36 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>Task</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class Task : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("Task")]
public partial class Task : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
[AutoIncrement, PrimaryKey, Relation("TaskSettingTask", typeof(TaskSetting), "TaskID", false), Relation("LogTask", typeof(Log), "TaskID", false), DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[DatabaseField("Service")]
private System.String m_Service = "";
[DatabaseField("Encryptionkey")]
private System.String m_Encryptionkey = "";
[DatabaseField("Signaturekey")]
private System.String m_Signaturekey = "";
[DatabaseField("SourcePath")]
private System.String m_SourcePath = "";
private System.Int64 m_ScheduleID = -9223372036854775808;
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
[Relation("TaskSchedule", typeof(Schedule), "ID"), DatabaseField("ScheduleID")]
private System.Int64 m_ScheduleID = long.MinValue;
#endregion
#region " properties "
@@ -91,31 +75,28 @@ namespace Duplicati.Datamodel
#region " referenced properties "
[Affects(typeof(Schedule))]
public Schedule Schedule
{
get{ return base.RelationManager.GetReferenceObject<Schedule>("Schedule", this); }
set{ base.RelationManager.SetReferenceObject<Schedule>("Schedule", this, value); }
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<Schedule>("TaskSchedule", this); }
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("TaskSchedule", this, value); }
}
private System.Collections.Generic.IList<TaskSetting> m_TaskSettings;
[Affects(typeof(TaskSetting))]
public System.Collections.Generic.IList<TaskSetting> TaskSettings
{
get
{
if (m_TaskSettings == null)
m_TaskSettings = base.RelationManager.GetReferenceCollection<TaskSetting>("Task", this);
return m_TaskSettings;
return ((DataFetcherWithRelations)m_dataparent).GetRelatedObjects<TaskSetting>("TaskSettingTask", this);
}
}
private System.Collections.Generic.IList<Log> m_Logs;
[Affects(typeof(Log))]
public System.Collections.Generic.IList<Log> Logs
{
get
{
if (m_Logs == null)
m_Logs = base.RelationManager.GetReferenceCollection<Log>("OwnerTask", this);
return m_Logs;
return ((DataFetcherWithRelations)m_dataparent).GetRelatedObjects<Log>("LogTask", this);
}
}
+15 -32
View File
@@ -1,52 +1,34 @@
#region Disclaimer / License
// Copyright (C) 2008, Kenneth Skovhede
// http://www.hexad.dk, opensource@hexad.dk
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
/// <metadata>
/// <creator>This class was created by DataClassFileBuilder (LightDatamodel)</creator>
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\Duplicati.sqlite;" />
/// <provider name="System.Data.LightDatamodel.SQLiteDataProvider" connectionstring="Version=3;Data Source=D:\Dokumenter\duplicati\Duplicati\GUI\Datamodel\Duplicati.sqlite;" />
/// <type>Table</type>
/// <namespace>Duplicati.Datamodel</namespace>
/// <name>TaskSetting</name>
/// <sql></sql>
/// </metadata>
using System.Data.LightDatamodel;
using System.Data.LightDatamodel.DataClassAttributes;
namespace Duplicati.Datamodel
{
public partial class TaskSetting : System.Data.LightDatamodel.DataClassBase
[DatabaseTable("TaskSetting")]
public partial class TaskSetting : DataClassBase
{
#region " private members "
[System.Data.LightDatamodel.MemberModifierAutoIncrement()]
private System.Int64 m_ID = 0;
private System.Int64 m_TaskID = -9223372036854775808;
[AutoIncrement, PrimaryKey, DatabaseField("ID")]
private System.Int64 m_ID = long.MinValue;
[Relation("TaskSettingTask", typeof(Task), "ID"), DatabaseField("TaskID")]
private System.Int64 m_TaskID = long.MinValue;
[DatabaseField("Name")]
private System.String m_Name = "";
[DatabaseField("Value")]
private System.String m_Value = "";
#endregion
#region " unique value "
public override object UniqueValue {get{return m_ID;}}
public override string UniqueColumn {get{return "ID";}}
#endregion
#region " properties "
public System.Int64 ID
@@ -77,10 +59,11 @@ namespace Duplicati.Datamodel
#region " referenced properties "
[Affects(typeof(Task))]
public Task Task
{
get{ return base.RelationManager.GetReferenceObject<Task>("Task", this); }
set{ base.RelationManager.SetReferenceObject<Task>("Task", this, value); }
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<Task>("TaskSettingTask", this); }
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("TaskSettingTask", this, value); }
}
#endregion
+26 -6
View File
@@ -31,15 +31,15 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="LightDatamodel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c7a68962c12dce64, processorArchitecture=MSIL">
<Reference Include="LightDatamodel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=180db27b8c387f04, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\LightDataModel\LightDatamodel.dll</HintPath>
<HintPath>Datamodel\LightDatamodel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.46.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SQLite\System.Data.SQLite.DLL</HintPath>
<HintPath>Datamodel\System.Data.SQLite.DLL</HintPath>
</Reference>
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
@@ -54,8 +54,8 @@
<DependentUpon>ApplicationSetup.cs</DependentUpon>
</Compile>
<Compile Include="DatabaseUpgrader.cs" />
<Compile Include="DuplicatiRunner.cs" />
<Compile Include="DuplicityOutputParser.cs" />
<Compile Include="DuplicityRunner.cs" />
<Compile Include="HelperControls\BackupItems.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -272,9 +272,29 @@
<Project>{F2854848-BF78-4A6D-9A2A-2AE2AFB70DF1}</Project>
<Name>WizardForm</Name>
</ProjectReference>
<ProjectReference Include="..\Core\Duplicati.Core.csproj">
<ProjectReference Include="..\Library\Backend\BackendInterface\Duplicati.Library.Backend.BackendInterface.csproj">
<Project>{994F3D0A-E91E-4EEE-80EE-064485E09909}</Project>
<Name>Duplicati.Library.Backend.BackendInterface</Name>
</ProjectReference>
<ProjectReference Include="..\Library\Backend\File\Duplicati.Library.Backend.File.csproj">
<Project>{FC9B7611-836F-4127-8B44-A7C31F506807}</Project>
<Name>Duplicati.Library.Backend.File</Name>
</ProjectReference>
<ProjectReference Include="..\Library\Backend\FTP\Duplicati.Library.Backend.FTP.csproj">
<Project>{F61679A9-E5DE-468A-B5A4-05F92D0143D2}</Project>
<Name>Duplicati.Library.Backend.FTP</Name>
</ProjectReference>
<ProjectReference Include="..\Library\Backend\SSH\Duplicati.Library.Backend.SSH.csproj">
<Project>{6BA21DCB-1701-4936-B177-3B6D4DE3474E}</Project>
<Name>Duplicati.Library.Backend.SSH</Name>
</ProjectReference>
<ProjectReference Include="..\Library\Core\Duplicati.Library.Core.csproj">
<Project>{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}</Project>
<Name>Duplicati.Core</Name>
<Name>Duplicati.Library.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Library\Main\Duplicati.Library.Main.csproj">
<Project>{10D2D1B7-C664-41D8-9B3A-00040C3D421B}</Project>
<Name>Duplicati.Library.Main</Name>
</ProjectReference>
<ProjectReference Include="Datamodel\Datamodel.csproj">
<Project>{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}</Project>
+103
View File
@@ -0,0 +1,103 @@
using System;
using System.Collections.Generic;
using System.Text;
using Duplicati.Datamodel;
using Duplicati.Library.Main;
namespace Duplicati.GUI
{
/// <summary>
/// This class translates tasks into Duplicati calls, and executes them
/// </summary>
public class DuplicatiRunner
{
public void ExecuteTask(IDuplicityTask task)
{
Dictionary<string, string> options = new Dictionary<string,string>();
if (string.IsNullOrEmpty(task.Task.Encryptionkey))
options.Add("no-encryption", "");
else
options.Add("passphrase", task.Task.Encryptionkey);
task.GetOptions(options);
switch (task.TaskType)
{
case DuplicityTaskType.FullBackup:
case DuplicityTaskType.IncrementalBackup:
Interface.Backup(task.SourcePath, task.TargetPath, options);
break;
case DuplicityTaskType.ListBackups:
List<string> res = new List<string>();
foreach (BackupEntry be in Interface.ParseFileList(task.SourcePath, options))
{
res.Add(be.Time.ToString());
foreach (BackupEntry bei in be.Incrementals)
res.Add(bei.Time.ToString());
}
(task as ListBackupsTask).Backups = res.ToArray();
break;
case DuplicityTaskType.ListFiles:
return;
case DuplicityTaskType.RemoveAllButNFull:
return;
case DuplicityTaskType.RemoveOlderThan:
return;
case DuplicityTaskType.Restore:
Interface.Restore(task.SourcePath, task.TargetPath, options);
return;
default:
return;
}
task.RaiseTaskCompleted("");
if (task.TaskType == DuplicityTaskType.FullBackup || task.TaskType == DuplicityTaskType.IncrementalBackup)
{
if (task.Schedule.KeepFull > 0)
ExecuteTask(new RemoveAllButNFullTask(task.Schedule, (int)task.Schedule.KeepFull));
if (!string.IsNullOrEmpty(task.Schedule.KeepTime))
ExecuteTask(new RemoveOlderThanTask(task.Schedule, task.Schedule.KeepTime));
}
}
private void PerformBackup(Schedule schedule, bool forceFull, string fullAfter)
{
if (forceFull)
ExecuteTask(new FullBackupTask(schedule));
else
ExecuteTask(new IncrementalBackupTask(schedule, fullAfter));
}
public void Restore(Schedule schedule, DateTime when, string where)
{
ExecuteTask(new RestoreTask(schedule, where, when));
}
public string[] ListBackups(Schedule schedule)
{
ListBackupsTask task = new ListBackupsTask(schedule);
ExecuteTask(task);
return task.Backups;
}
public void IncrementalBackup(Schedule schedule)
{
PerformBackup(schedule, false, null);
}
public void FullBackup(Schedule schedule)
{
PerformBackup(schedule, true, null);
}
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ namespace Duplicati.GUI
public static void ParseData(Log log)
{
string text = log.LogBlob.StringData;
string text = log.Blob.StringData;
log.ParsedStatus = "Error";
+1 -1
View File
@@ -107,7 +107,7 @@ namespace Duplicati.GUI.HelperControls
{
try
{
DuplicityRunner r = new DuplicityRunner(Application.StartupPath, null);
DuplicatiRunner r = new DuplicatiRunner();
m_backups = r.ListBackups(m_schedule);
}
catch (Exception e)
+2 -2
View File
@@ -98,7 +98,7 @@ namespace Duplicati.GUI
MessageBox.Show("Failed to create, open or upgrade the database.\r\nError message: " + ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
DataConnection = new DataFetcherThreadSafe(MainLock, new DataFetcherCached(new SQLiteDataProvider(con)));
DataConnection = new DataFetcherWithRelations(new SQLiteDataProvider(con));
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
@@ -131,7 +131,7 @@ namespace Duplicati.GUI
TrayIcon.ContextMenuStrip.Items[0].Font = new Font(TrayIcon.ContextMenuStrip.Items[0].Font, FontStyle.Bold);
ApplicationSettings = new ApplicationSettings(DataConnection);
DuplicityRunner runner = new DuplicityRunner(Application.StartupPath, null);
DuplicatiRunner runner = new DuplicatiRunner();
WorkThread = new WorkerThread<IDuplicityTask>(new WorkerThread<IDuplicityTask>.ProcessItemDelegate(runner.ExecuteTask));
+1 -1
View File
@@ -25,7 +25,7 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI
{
+2 -2
View File
@@ -23,7 +23,7 @@ using System.Text;
using System.Threading;
using Duplicati.Datamodel;
using System.Data.LightDatamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI
{
@@ -123,7 +123,7 @@ namespace Duplicati.GUI
System.Data.LightDatamodel.QueryModel.Operation op = System.Data.LightDatamodel.QueryModel.Parser.ParseQuery("ORDER BY When ASC");
lock(m_lock)
m_schedule = op.EvaluateList<Schedule>(reps);
m_schedule = op.EvaluateList<Schedule>(reps).ToArray();
if (NewSchedule != null)
NewSchedule(this, null);
@@ -25,7 +25,7 @@ using System.Data;
using System.Text;
using System.Windows.Forms;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI.Service_controls
{
@@ -68,7 +68,7 @@ namespace Duplicati.GUI.Service_controls
m_task = m_schedule.Tasks[0];
}
if (!m_task.RelationManager.ExistsInDb(m_task))
if (!m_task.ExistsInDb)
{
if (string.IsNullOrEmpty(m_task.Encryptionkey))
m_task.Encryptionkey = KeyGenerator.GenerateKey(64, 128);
@@ -106,7 +106,7 @@ namespace Duplicati.GUI.Service_controls
private void GenerateEncryptionKey_Click(object sender, EventArgs e)
{
if (m_task.RelationManager.ExistsInDb(m_task) && !string.IsNullOrEmpty(m_task.Encryptionkey))
if (m_task.ExistsInDb && !string.IsNullOrEmpty(m_task.Encryptionkey))
if (MessageBox.Show(this, "If you modify the encryption key, you can no longer recover any existing backups. Please make sure you have a copy of the key. Do you want to continue?", Application.ProductName, MessageBoxButtons.YesNoCancel) != DialogResult.Yes)
return;
@@ -115,7 +115,7 @@ namespace Duplicati.GUI.Service_controls
private void GenerateSignatureKey_Click(object sender, EventArgs e)
{
if (m_task.RelationManager.ExistsInDb(m_task) && !string.IsNullOrEmpty(m_task.Encryptionkey))
if (m_task.ExistsInDb && !string.IsNullOrEmpty(m_task.Encryptionkey))
if (MessageBox.Show(this, "If you modify the signature key, you can no longer verify any existing backups. Please make sure you have a copy of the key. Do you want to continue?", Application.ProductName, MessageBoxButtons.YesNoCancel) != DialogResult.Yes)
return;
@@ -163,7 +163,7 @@ namespace Duplicati.GUI.Service_controls
private void ServiceTypeCombo_SelectedIndexChanged(object sender, EventArgs e)
{
if (!m_isUpdating && m_task != null && m_task.RelationManager.ExistsInDb(m_task))
if (!m_isUpdating && m_task != null && m_task.ExistsInDb)
{
if (MessageBox.Show(this, "Selecting a different backend will remove the settings from the current backend. Are you sure you want to continue?", Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
{
+1 -1
View File
@@ -31,7 +31,7 @@ namespace Duplicati.GUI
{
public partial class ServiceSetup : Form
{
private IDataFetcher m_connection;
private IDataFetcherCached m_connection;
public ServiceSetup()
{
InitializeComponent();
+2 -2
View File
@@ -25,7 +25,7 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI
{
@@ -179,7 +179,7 @@ namespace Duplicati.GUI
LogViewer dlg = new LogViewer();
//TODO: Figure out why the LDM fails here
dlg.LogText.Text = l.LogBlob.StringData;
dlg.LogText.Text = l.Blob.StringData;
dlg.ShowDialog(this);
}
+122 -7
View File
@@ -43,9 +43,14 @@ namespace Duplicati.GUI
event TaskCompletedHandler TaskCompleted;
void RaiseTaskCompleted(string output);
void GetArguments(List<string> args);
DateTime BeginTime { get; set; }
Task Task { get; }
Schedule Schedule { get; }
void GetOptions(Dictionary<string, string> options);
string TargetPath { get; }
string SourcePath { get; }
}
public abstract class BackupTask : IDuplicityTask
@@ -73,6 +78,13 @@ namespace Duplicati.GUI
if (TaskCompleted != null)
TaskCompleted(this, output);
}
public abstract string TargetPath { get; }
public abstract string SourcePath { get; }
public virtual void GetOptions(Dictionary<string, string> options)
{
this.Task.GetOptions(options);
}
}
public abstract class FullOrIncrementalTask : BackupTask
@@ -91,7 +103,7 @@ namespace Duplicati.GUI
LogBlob lb = this.Task.DataParent.Add<LogBlob>();
lb.StringData = output;
l.LogBlob = lb;
l.Blob = lb;
this.Task.Logs.Add(l);
//Keep some of the data in an easy to read manner
@@ -101,7 +113,7 @@ namespace Duplicati.GUI
l.BeginTime = m_beginTime;
l.EndTime = DateTime.Now;
this.Task.DataParent.CommitAll();
(this.Task.DataParent as System.Data.LightDatamodel.IDataFetcherCached).CommitAll();
Program.DataConnection.CommitAll();
}
}
@@ -118,6 +130,23 @@ namespace Duplicati.GUI
}
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
if (!string.IsNullOrEmpty(this.Task.Signaturekey))
options.Add("sign-key", this.Task.Signaturekey);
}
public override string SourcePath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.SourcePath); }
}
public override string TargetPath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
}
public class FullBackupTask : FullOrIncrementalTask
@@ -135,6 +164,12 @@ namespace Duplicati.GUI
base.GetArguments(args);
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
options.Add("full", "");
}
}
public class IncrementalBackupTask : FullOrIncrementalTask
@@ -169,13 +204,22 @@ namespace Duplicati.GUI
args.Add(this.FullAfter);
}
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
options.Add("incremental", "");
if (!string.IsNullOrEmpty(this.FullAfter))
options.Add("full-if-older-than", this.FullAfter);
}
}
public class ListBackupsTask : BackupTask
{
private string[] m_backups = null;
public override DuplicityTaskType TaskType { get { return DuplicityTaskType.ListBackups; } }
public string[] Backups { get { return m_backups; } }
public string[] Backups { get { return m_backups; } set { m_backups = value; } }
public ListBackupsTask(Schedule schedule)
: base(schedule)
@@ -185,6 +229,9 @@ namespace Duplicati.GUI
void ListBackupsTask_TaskCompleted(IDuplicityTask owner, string output)
{
if (string.IsNullOrEmpty(output))
return;
const string DIVIDER = "-------------------------\r\n";
const string HEADERS = " Type of backup set: Time: Num volumes:";
@@ -225,6 +272,16 @@ namespace Duplicati.GUI
args.Add("collection-status");
args.Add("\"" + System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()) + "\"");
}
public override string SourcePath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override string TargetPath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
}
public class RestoreTask : BackupTask
@@ -281,7 +338,7 @@ namespace Duplicati.GUI
LogBlob lb = this.Task.DataParent.Add<LogBlob>();
lb.StringData = output;
l.LogBlob = lb;
l.Blob = lb;
this.Task.Logs.Add(l);
//Keep some of the data in an easy to read manner
@@ -291,7 +348,7 @@ namespace Duplicati.GUI
l.BeginTime = m_beginTime;
l.EndTime = DateTime.Now;
this.Task.DataParent.CommitAll();
(this.Task.DataParent as System.Data.LightDatamodel.IDataFetcherCached).CommitAll();
Program.DataConnection.CommitAll();
}
}
@@ -314,6 +371,28 @@ namespace Duplicati.GUI
args.Add("\"" + System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()) + "\"");
args.Add("\"" + System.Environment.ExpandEnvironmentVariables(this.TargetDir) + "\"");
}
public override string SourcePath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override string TargetPath
{
get { return System.Environment.ExpandEnvironmentVariables(this.TargetDir); }
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
options.Add("force", "");
if (!string.IsNullOrEmpty(When))
options.Add("restore-time", this.When);
if (!string.IsNullOrEmpty(this.SourceFiles))
options.Add("file-to-restore", this.SourceFiles);
}
}
public class RemoveAllButNFullTask : BackupTask
@@ -337,7 +416,7 @@ namespace Duplicati.GUI
LogBlob lb = this.Task.DataParent.Add<LogBlob>();
lb.StringData = output;
l.LogBlob = lb;
l.Blob = lb;
this.Task.Logs.Add(l);
//Keep some of the data in an easy to read manner
@@ -356,6 +435,24 @@ namespace Duplicati.GUI
args.Add("\"" + System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()) + "\"");
args.Add("--force");
}
public override string SourcePath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override string TargetPath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
options.Add("remove-all-but-n-full", this.FullCount.ToString());
options.Add("force", "");
}
}
public class RemoveOlderThanTask : BackupTask
@@ -380,7 +477,7 @@ namespace Duplicati.GUI
LogBlob lb = this.Task.DataParent.Add<LogBlob>();
lb.StringData = output;
l.LogBlob = lb;
l.Blob = lb;
this.Task.Logs.Add(l);
//Keep some of the data in an easy to read manner
@@ -400,5 +497,23 @@ namespace Duplicati.GUI
args.Add("--force");
}
public override string SourcePath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override string TargetPath
{
get { return System.Environment.ExpandEnvironmentVariables(this.Task.GetDestinationPath()); }
}
public override void GetOptions(Dictionary<string, string> options)
{
base.GetOptions(options);
options.Add("remove-older-than", this.Older);
options.Add("force", "");
}
}
}
@@ -68,7 +68,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
void IWizardControl.Enter(IWizardForm owner)
{
List<KeyValuePair<string, string>> strings = new List<KeyValuePair<string,string>>();
if (!m_schedule.RelationManager.ExistsInDb(m_schedule))
if (!m_schedule.ExistsInDb)
strings.Add(new KeyValuePair<string,string>("Action", "Add new backup"));
else
strings.Add(new KeyValuePair<string, string>("Action", "Modify backup"));
@@ -26,7 +26,7 @@ using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Wizard;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI.Wizard_pages.Add_backup
{
@@ -184,9 +184,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
{
m_task = task;
if (m_task != null)
{
m_showAsInitial = !m_task.RelationManager.ExistsInDb(m_task);
}
m_showAsInitial = !m_task.ExistsInDb;
}
#endregion
@@ -26,7 +26,7 @@ using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Wizard;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI.Wizard_pages.Add_backup
{
@@ -161,10 +161,8 @@ namespace Duplicati.GUI.Wizard_pages.Backends.FTP
{
try
{
System.Net.WebClient wc = new System.Net.WebClient();
wc.Credentials = new System.Net.NetworkCredential(Username.Text, Password.Text);
string hostname = "ftp://" + Username.Text + "@" + Servername.Text + (Port.Value != 21 ? ":21/" : "/") + Path.Text;
wc.DownloadData(hostname);
string hostname = "ftp://" + Username.Text + ":" + Password.Text + "@" + Servername.Text + (Port.Value != 21 ? ":21/" : "/") + Path.Text;
string[] files = Duplicati.Library.Main.Interface.List(hostname, new Dictionary<string, string>());
MessageBox.Show(this, "Connection succeeded!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
m_hasTested = true;
@@ -104,6 +104,12 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File
else
targetpath = TargetDrive.Text + "\\" + Folder.Text;
if (UseCredentials.Checked)
if (!Duplicati.Library.Backend.File.PreAuthenticate(targetpath, Username.Text, Password.Text))
{
MessageBox.Show(this, "Failed to authenticate using the given credentials.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
try
{
@@ -181,11 +187,6 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File
if (m_isUpdating)
return;
if (UseCredentials.Checked)
{
MessageBox.Show(this, "This feature is not supported in the current version of Duplicati. You may enter the information now, and it may be used in later versions of Duplicati.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void UsePath_CheckedChanged(object sender, EventArgs e)
@@ -218,7 +219,6 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File
public void Setup(Duplicati.Datamodel.Task task)
{
bool m_new = !task.RelationManager.ExistsInDb(task);
m_file = new Duplicati.Datamodel.Backends.File(task);
}
@@ -135,7 +135,22 @@ namespace Duplicati.GUI.Wizard_pages.Backends.SSH
private void TestConnection_Click(object sender, EventArgs e)
{
MessageBox.Show(this, "Testing is not implemented for SSH yet.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
if (ValidateForm())
{
try
{
string hostname = "ssh://" + Username.Text + ":" + Password.Text + "@" + Servername.Text + (Port.Value != 22 ? ":22/" : "/") + Path.Text;
string[] files = Duplicati.Library.Main.Interface.List(hostname, new Dictionary<string, string>());
MessageBox.Show(this, "Connection succeeded!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
m_hasTested = true;
}
catch (Exception ex)
{
MessageBox.Show(this, "Connection Failed: " + ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private bool ValidateForm()
@@ -26,7 +26,7 @@ using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Wizard;
using Duplicati.Datamodel;
using Duplicati.Core;
using Duplicati.Library.Core;
namespace Duplicati.GUI.Wizard_pages.Restore
{
+1 -1
View File
@@ -63,7 +63,7 @@ namespace Duplicati.GUI
/// <summary>
/// The connection on which changes are made
/// </summary>
IDataFetcher m_connection;
IDataFetcherCached m_connection;
/// <summary>
/// The item to be commited, for the add procedure
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.BackendInterface</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -37,6 +39,9 @@
<Compile Include="FileEntry.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.BackendLoader</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -42,6 +44,9 @@
<Name>Duplicati.Library.Backend.BackendInterface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.FTP</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -46,6 +48,9 @@
<Name>Duplicati.Library.Backend.BackendInterface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.File</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -35,6 +37,7 @@
<ItemGroup>
<Compile Include="FileBackend.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Win32.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\Duplicati.Library.Core.csproj">
@@ -46,6 +49,9 @@
<Name>Duplicati.Library.Backend.BackendInterface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
+30 -8
View File
@@ -26,6 +26,8 @@ namespace Duplicati.Library.Backend
public class File : IBackendInterface
{
private string m_path;
private string m_username;
private string m_password;
Dictionary<string, string> m_options;
public File()
@@ -35,9 +37,28 @@ namespace Duplicati.Library.Backend
public File(string url, Dictionary<string, string> options)
{
m_options = options;
m_path = ExtractFilename(url, m_options);
m_path = url.Substring("file://".Length);
if (m_path.IndexOf("@") > 0)
{
m_username = m_path.Substring(0, m_path.IndexOf("@"));
m_path = m_path.Substring(m_path.IndexOf("@") + 1);
if (m_username.IndexOf(":") > 0)
{
m_password = m_username.Substring(0, m_username.IndexOf(":"));
m_username = m_username.Substring(m_username.IndexOf(":") + 1);
}
else
{
if (options.ContainsKey("ftp_password"))
m_password = options["ftp_password"];
}
}
if (!System.IO.Path.IsPathRooted(url))
m_path = System.IO.Path.GetFullPath(m_path);
}
#region IBackendInterface Members
@@ -57,7 +78,9 @@ namespace Duplicati.Library.Backend
string path = m_path;
List<FileEntry> ls = new List<FileEntry>();
//TODO: Impersonate, if username+password is applied
//Attempt to apply credentials
if (!string.IsNullOrEmpty(m_username) && m_password != null)
Win32.PreAuthenticate(m_path, m_username, m_password);
foreach (string s in System.IO.Directory.GetFiles(path))
{
@@ -94,12 +117,11 @@ namespace Duplicati.Library.Backend
System.IO.File.Delete(path);
}
private string ExtractFilename(string url, Dictionary<string, string> options)
{
//TODO: Read out username/password
return url.Substring("file://".Length);
}
#endregion
public static bool PreAuthenticate(string path, string username, string password)
{
return Win32.PreAuthenticate(path, username, password);
}
}
}
+107
View File
@@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace Duplicati.Library.Backend
{
internal class Win32
{
[DllImport("mpr.dll")]
private static extern int WNetAddConnection2(ref NETRESOURCE netResource,
string password, string username, int flags);
private struct NETRESOURCE
{
public ResourceScope dwScope;
public ResourceType dwType;
public ResourceDisplayType dwDisplayType;
public ResourceUsage dwUsage;
public string LocalName;
public string RemoteName;
public string Comment;
public string Provider;
}
private enum ResourceScope : int
{
RESOURCE_CONNECTED = 1,
RESOURCE_GLOBALNET,
RESOURCE_REMEMBERED,
RESOURCE_RECENT,
RESOURCE_CONTEXT
};
private enum ResourceType : int
{
RESOURCETYPE_ANY,
RESOURCETYPE_DISK,
RESOURCETYPE_PRINT,
RESOURCETYPE_RESERVED
};
private enum ResourceDisplayType : int
{
RESOURCEDISPLAYTYPE_GENERIC,
RESOURCEDISPLAYTYPE_DOMAIN,
RESOURCEDISPLAYTYPE_SERVER,
RESOURCEDISPLAYTYPE_SHARE,
RESOURCEDISPLAYTYPE_FILE,
RESOURCEDISPLAYTYPE_GROUP,
RESOURCEDISPLAYTYPE_NETWORK,
RESOURCEDISPLAYTYPE_ROOT,
RESOURCEDISPLAYTYPE_SHAREADMIN,
RESOURCEDISPLAYTYPE_DIRECTORY,
RESOURCEDISPLAYTYPE_TREE,
RESOURCEDISPLAYTYPE_NDSCONTAINER
};
private enum ResourceUsage : int
{
RESOURCEUSAGE_CONNECTABLE = 0x00000001,
RESOURCEUSAGE_CONTAINER = 0x00000002,
RESOURCEUSAGE_NOLOCALDEVICE = 0x00000004,
RESOURCEUSAGE_SIBLING = 0x00000008,
RESOURCEUSAGE_ATTACHED = 0x00000010,
RESOURCEUSAGE_ALL = (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED),
};
private const int CONNECT_UPDATE_PROFILE = 0x1;
internal static bool PreAuthenticate(string path, string username, string password)
{
//Strip it down from \\server\share\folder1\folder2\filename.extension to
// \\server\share
string minpath = path;
if (!minpath.StartsWith("\\\\"))
return false;
int first = minpath.IndexOf("\\", 2);
if (first <= 0)
return false;
int next = minpath.IndexOf("\\", first + 1);
if (next >= 0)
minpath = minpath.Substring(0, next);
//This only works on Windows, and probably not on Win95
try
{
NETRESOURCE rsc = new NETRESOURCE();
rsc.dwScope = ResourceScope.RESOURCE_GLOBALNET;
rsc.dwType = ResourceType.RESOURCETYPE_DISK;
rsc.dwDisplayType = ResourceDisplayType.RESOURCEDISPLAYTYPE_SHARE;
rsc.dwUsage = ResourceUsage.RESOURCEUSAGE_CONNECTABLE;
rsc.LocalName = null;
rsc.RemoteName = minpath;
return WNetAddConnection2(ref rsc, password, username, CONNECT_UPDATE_PROFILE) == 0;
}
catch
{
return false;
}
}
}
}
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.SSH</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -46,6 +48,9 @@
<Name>Duplicati.Library.Backend.FTP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
+8 -1
View File
@@ -210,7 +210,14 @@ namespace Duplicati.Library.Backend
if (args != null)
p.StartInfo.Arguments += " " + args;
p.Start();
try
{
p.Start();
}
catch(Exception ex)
{
throw new Exception("Failed to start the SSH application (" + p.StartInfo.FileName + ").\r\nError message: " + ex.Message, ex);
}
//TODO: This is not the most robust way of dealing with
// the psftp and pscp commands. It is likely not very portable either
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Compression</RootNamespace>
<AssemblyName>Duplicati.Library.Compression</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -50,6 +52,9 @@
<Name>Duplicati.Library.Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Encryption</RootNamespace>
<AssemblyName>Duplicati.Library.Encryption</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -54,6 +56,9 @@
<Name>Duplicati.Library.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Logging</RootNamespace>
<AssemblyName>Duplicati.Library.Logging</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -39,6 +41,9 @@
<Compile Include="StreamLog.cs" />
<Compile Include="Timer.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Main</RootNamespace>
<AssemblyName>Duplicati.Library.Main</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -70,6 +72,9 @@
<Name>Duplicati.Library.SharpRSync</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
@@ -9,6 +9,8 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.SharpRSync</RootNamespace>
<AssemblyName>Duplicati.Library.SharpRSync</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -44,6 +46,9 @@
<Compile Include="Interface.cs" />
<Compile Include="Utility.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Binary file not shown.
Binary file not shown.
Binary file not shown.