Statistics
| Branch: | Revision:

root / trunk / Pithos.Core / IStatusNotification.cs @ eae84ae8

History | View | Annotate | Download (1.4 kB)

1
using System.Collections.Generic;
2
using System.Diagnostics;
3
using System.IO;
4
using Pithos.Interfaces;
5
using Pithos.Network;
6

    
7
namespace Pithos.Core
8
{
9
    public interface IStatusNotification
10
    {        
11
        void NotifyChange(string status,TraceLevel level=TraceLevel.Info);
12
        void NotifyChangedFile(string filePath);
13
        void NotifyAccount(AccountInfo policy);
14
        void NotifyConflicts(IEnumerable<FileSystemInfo> conflictFiles, string message);
15
        void NotifyForFiles(IEnumerable<FileSystemInfo> files, string message,TraceLevel level);
16
        void Notify(Notification notification);
17
    }
18

    
19
    public class Notification
20
    {
21
        public TraceLevel Level { get; set; }
22
        public string Title { get; set; }
23
        public string Message { get; set; }
24

    
25
        public Notification()
26
        {
27
            Level=TraceLevel.Info;
28
            Title = "";
29
            Message = "";
30
        }
31
    }
32

    
33
    public class Notification<T>:Notification
34
    {
35
        public T Data { get; set; }
36
    }
37

    
38
    public class FilesNotification:Notification<IEnumerable<FileSystemInfo>>
39
    {        
40
    }
41

    
42
    public class PollNotification:Notification
43
    {
44
        public PollNotification()
45
        {
46
            Level=TraceLevel.Verbose;
47
            Title = "Pithos";
48
            Message = "Polling";
49
        }
50
    }
51

    
52
    public class CloudNotification:Notification<ObjectInfo>
53
    {
54
        
55
    }
56
}