forked from CommentViewerCollection/MultiCommentViewer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIPlugin.cs
75 lines (74 loc) · 2.3 KB
/
IPlugin.cs
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using SitePlugin;
namespace Plugin
{
public interface IPlugin
{
string Name { get; }
string Description { get; }
void OnMessageReceived(ISiteMessage message, IMessageMetadata messageMetadata);
//connectionが追加されたり削除されたりしたら通知される仕組みが欲しい
//接続、切断情報も。
void OnLoaded();
void OnClosing();
void ShowSettingView();
void OnTopmostChanged(bool isTopmost);
IPluginHost Host { get; set; }
}
public interface IPluginHost
{
/// <summary>
/// 設定を保存するディレクトリの絶対パス
/// </summary>
string SettingsDirPath { get; }
double MainViewLeft { get; }
double MainViewTop { get; }
bool IsTopmost { get; }
/// <summary>
///
/// </summary>
/// <param name="pluginName"></param>
/// <param name="s">serialized options</param>
void SaveOptions(string path, string s);
/// <summary>
///
/// </summary>
/// <param name="pluginName"></param>
/// <returns>serialized options</returns>
string LoadOptions(string path);
/// <summary>
/// 全ての接続中のConnectionにコメントを投稿する
/// </summary>
void PostCommentToAll(string comment);
/// <summary>
///
/// </summary>
/// <param name="guid"></param>
/// <param name="comment"></param>
void PostComment(string guid, string comment);
IEnumerable<IConnectionStatus> GetAllConnectionStatus();
IUser GetUser(Guid sitePluginGuid, string userId);
}
public interface ICommentData
{
string ThumbnailUrl { get; }
int ThumbnailWidth { get; }
int ThumbnailHeight { get; }
/// <summary>
/// コメントID
/// </summary>
string Id { get; }
string UserId { get; }
string Nickname { get; }
string Comment { get; }
bool IsNgUser { get; }
bool IsFirstComment { get; }
string SiteName { get; }
bool Is184 { get; }
}
}