mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: MacCloud/S3: step-99: S3 Cloud Driver - TencentCOS
This commit is contained in:
parent
2f7f150698
commit
53749a439a
3 changed files with 57 additions and 2 deletions
|
|
@ -152,6 +152,11 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="uWFXOptionsS3"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="drivers/aws/tencentcos/utencentcosclient.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="uTencentCOSClient"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
|
@ -161,7 +166,7 @@
|
|||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="../../../../sdk;util;drivers/root;drivers;drivers/aws;drivers/aws/aliyunoss;drivers/oauth2/box;drivers/oauth2/dropbox;drivers/oauth2/onedrive;drivers/oauth2/yandex;wfx/ui;wfx;drivers/oauth2"/>
|
||||
<OtherUnitFiles Value="../../../../sdk;util;drivers/root;drivers;drivers/aws;drivers/aws/aliyunoss;drivers/oauth2/box;drivers/oauth2/dropbox;drivers/oauth2/onedrive;drivers/oauth2/yandex;wfx/ui;wfx;drivers/oauth2;drivers/aws/tencentcos"/>
|
||||
<UnitOutputDirectory Value="../lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
unit uTencentCOSClient;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
uCloudDriver, uAWSAuth, uS3Client;
|
||||
|
||||
type
|
||||
|
||||
{ TTencentCOSClient }
|
||||
|
||||
TTencentCOSClient = class( TS3Client )
|
||||
public
|
||||
class function driverName: String; override;
|
||||
class function createInstance: TCloudDriver; override;
|
||||
function clone: TCloudDriver; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TTencentCOSClient }
|
||||
|
||||
class function TTencentCOSClient.driverName: String;
|
||||
begin
|
||||
Result:= 'TencentCOS';
|
||||
end;
|
||||
|
||||
class function TTencentCOSClient.createInstance: TCloudDriver;
|
||||
begin
|
||||
Result:= TTencentCOSClient.Create;
|
||||
end;
|
||||
|
||||
function TTencentCOSClient.clone: TCloudDriver;
|
||||
var
|
||||
newClient: TTencentCOSClient;
|
||||
begin
|
||||
newClient:= TTencentCOSClient.Create;
|
||||
newClient._authSession.Free;
|
||||
newClient._authSession:= TAWSAuthSession( _authSession.clone(newClient) );
|
||||
Result:= newClient;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ uses
|
|||
CocoaAll, uMiniCocoa,
|
||||
uWFXPlugin, uCloudDriver,
|
||||
uOAuth2Core, uOAuth2Client, uDropBoxClient, uYandexClient, uOneDriveClient, uBoxClient,
|
||||
uAWSCore, uS3Client, uAliyunOSSClient,
|
||||
uAWSCore, uS3Client, uAliyunOSSClient, uTencentCOSClient,
|
||||
uMiniUtil;
|
||||
|
||||
type
|
||||
|
|
@ -541,6 +541,9 @@ begin
|
|||
|
||||
WFXCloudDriverConfigManager.register( TAliyunOSSClient.driverName, TWFXS3Config );
|
||||
cloudDriverManager.register( TAliyunOSSClient );
|
||||
|
||||
WFXCloudDriverConfigManager.register( TTencentCOSClient.driverName, TWFXS3Config );
|
||||
cloudDriverManager.register( TTencentCOSClient );
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue