This repository has been archived by the owner on Sep 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to java-libstorj 0.8.1 - First fully working version!
- Loading branch information
Showing
12 changed files
with
116 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace LibStorj.Wrapper.Contracts.Models | ||
{ | ||
public delegate void ProgressChanged(JobBase job); | ||
public delegate void JobFinished(JobBase job); | ||
public delegate void JobFailed(JobBase job); | ||
|
||
public abstract class JobBase | ||
{ | ||
public long Id { get; set; } | ||
public bool IsFinished { get; set; } | ||
public bool IsOnError { get; set; } | ||
public int ErrorCode { get; set; } | ||
public string ErrorMessage { get; set; } | ||
|
||
public event ProgressChanged ProgressChanged; | ||
public event JobFinished JobFinished; | ||
public event JobFailed JobFailed; | ||
|
||
public void RaiseProgressChanged() | ||
{ | ||
if (ProgressChanged != null) | ||
ProgressChanged(this); | ||
} | ||
|
||
public void RaiseJobFinished() | ||
{ | ||
if (JobFinished != null) | ||
JobFinished(this); | ||
} | ||
|
||
public void RaiseJobFailed() | ||
{ | ||
if (JobFailed != null) | ||
JobFailed(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LibStorj.Wrapper.Contracts.Models | ||
{ | ||
public class UploadJob : JobBase | ||
{ | ||
public ProgressStatusUpload CurrentProgress { get; set; } | ||
public string FileName { get; set; } | ||
|
||
public UploadJob(string fileName) | ||
{ | ||
FileName = fileName; | ||
CurrentProgress = new ProgressStatusUpload(fileName, 0, 0, 0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters