-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
483 additions
and
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Abstractions/Services/IBoardLoaderService.cs | ||
|
||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using ChatAAC.Models.Obf; | ||
|
||
namespace ChatAAC.Abstractions.Services; | ||
|
||
public interface IBoardLoaderService | ||
{ | ||
/// <summary> | ||
/// Ładuje plik .obf lub .obz asynchronicznie | ||
/// </summary> | ||
/// <param name="filePath">Ścieżka do pliku</param> | ||
/// <param name="cancellationToken">Token anulowania operacji</param> | ||
/// <returns>Zadanie reprezentujące operację ładowania</returns> | ||
Task LoadObfOrObzFileAsync(string filePath, CancellationToken cancellationToken = default); | ||
|
||
/// <summary> | ||
/// Ładuje plik .obf asynchronicznie | ||
/// </summary> | ||
/// <param name="filePath">Ścieżka do pliku .obf</param> | ||
/// <param name="cancellationToken">Token anulowania operacji</param> | ||
/// <returns>Zadanie reprezentujące operację ładowania</returns> | ||
Task LoadObfFileAsync(string? filePath, CancellationToken cancellationToken = default); | ||
|
||
/// <summary> | ||
/// Zapisuje plik .obf asynchronicznie | ||
/// </summary> | ||
/// <param name="filePath">Ścieżka docelowa pliku</param> | ||
/// <param name="obfFile">Obiekt pliku OBF do zapisu</param> | ||
/// <param name="cancellationToken">Token anulowania operacji</param> | ||
/// <returns>Zadanie reprezentujące operację zapisu</returns> | ||
Task SaveObfFileAsync(string filePath, ObfFile obfFile, CancellationToken cancellationToken = default); | ||
} |
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,16 @@ | ||
namespace ChatAAC.Abstractions.Services; | ||
|
||
public interface ICachePathProvider | ||
{ | ||
/// <summary> | ||
/// Pobiera ścieżkę do katalogu cache plików OBF | ||
/// </summary> | ||
/// <returns>Ścieżka do katalogu cache OBF</returns> | ||
string GetObfCacheDirectory(); | ||
|
||
/// <summary> | ||
/// Pobiera ścieżkę do katalogu cache piktogramów | ||
/// </summary> | ||
/// <returns>Ścieżka do katalogu cache piktogramów</returns> | ||
string GetPictogramsCacheDirectory(); | ||
} |
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,32 @@ | ||
namespace ChatAAC.Abstractions.Services; | ||
|
||
public interface IFileTypeValidator | ||
{ | ||
/// <summary> | ||
/// Sprawdza, czy plik jest obrazem | ||
/// </summary> | ||
/// <param name="fileName">Nazwa pliku</param> | ||
/// <returns>True, jeśli plik jest obrazem, False w przeciwnym razie</returns> | ||
bool IsImageFile(string fileName); | ||
|
||
/// <summary> | ||
/// Sprawdza, czy plik jest plikiem OBF | ||
/// </summary> | ||
/// <param name="fileName">Nazwa pliku</param> | ||
/// <returns>True, jeśli plik jest OBF, False w przeciwnym razie</returns> | ||
bool IsObfFile(string fileName); | ||
|
||
/// <summary> | ||
/// Sprawdza, czy plik jest plikiem manifestu | ||
/// </summary> | ||
/// <param name="fileName">Nazwa pliku</param> | ||
/// <returns>True, jeśli plik jest manifestem, False w przeciwnym razie</returns> | ||
bool IsManifestFile(string fileName); | ||
|
||
/// <summary> | ||
/// Sprawdza, czy plik jest plikiem OBZ | ||
/// </summary> | ||
/// <param name="fileName">Nazwa pliku</param> | ||
/// <returns>True, jeśli plik jest OBZ, False w przeciwnym razie</returns> | ||
bool IsObzFile(string fileName); | ||
} |
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,16 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using ChatAAC.Models.Obf; | ||
|
||
namespace ChatAAC.Abstractions.Services; | ||
|
||
public interface IObfLoader | ||
{ | ||
/// <summary> | ||
/// Ładuje plik OBF asynchronicznie | ||
/// </summary> | ||
/// <param name="filePath">Ścieżka do pliku</param> | ||
/// <param name="cancellationToken">Token anulowania operacji</param> | ||
/// <returns>Załadowany obiekt ObfFile lub null</returns> | ||
Task<ObfFile?> LoadObfAsync(string? filePath, CancellationToken cancellationToken = default); | ||
} |
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
Oops, something went wrong.