blob: 2a9cf4e901ca8d017d1d389720743e7cd936328c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Explorer;
namespace Tango.PPC.Common.Storage
{
/// <summary>
/// Represents a storage provider responsible of notifying about flash drives connection/disconnection.
/// </summary>
public interface IStorageProvider
{
/// <summary>
/// Occurs when a new storage drive has been inserted.
/// </summary>
event EventHandler<DriveInfo> StorageConnected;
/// <summary>
/// Occurs when a storage drive has been removed.
/// </summary>
event EventHandler<DriveInfo> StorageDisconnected;
/// <summary>
/// Gets a value indicating whether a storage drive is currently inserted.
/// </summary>
bool IsConnected { get; }
/// <summary>
/// Gets the inserted storage drive information.
/// </summary>
DriveInfo Drive { get; }
/// <summary>
/// Registers a method for handling a file selection.
/// </summary>
/// <param name="extension">The file extension.</param>
/// <param name="handler">The handler.</param>
void RegisterFileHandler(String extension, Action<List<ExplorerFileItem>> handler);
/// <summary>
/// Unregisters the file handler.
/// </summary>
/// <param name="handler">The handler.</param>
void UnregisterFileHandler(Action<List<ExplorerFileItem>> handler);
/// <summary>
/// Submits a file selection.
/// </summary>
/// <param name="fileItem">The file item.</param>
void SubmitFileSelection(List<ExplorerFileItem> fileItems);
}
}
|