| 1 | using System; |
|---|
| 2 | using System.Collections.Generic; |
|---|
| 3 | using System.Text; |
|---|
| 4 | using System.Net.Sockets; |
|---|
| 5 | using System.IO; |
|---|
| 6 | using Misuzilla.Net.Irc; |
|---|
| 7 | |
|---|
| 8 | namespace Misuzilla.Applications.TwitterIrcGateway |
|---|
| 9 | { |
|---|
| 10 | public class MessageReceivedEventArgs : EventArgs |
|---|
| 11 | { |
|---|
| 12 | public IRCMessage Message; |
|---|
| 13 | public TcpClient Client; |
|---|
| 14 | public StreamWriter Writer; |
|---|
| 15 | public MessageReceivedEventArgs(IRCMessage msg, StreamWriter sw, TcpClient tcpClient) |
|---|
| 16 | { |
|---|
| 17 | Writer = sw; |
|---|
| 18 | Client = tcpClient; |
|---|
| 19 | Message = msg; |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | public class SessionStartedEventArgs : EventArgs |
|---|
| 24 | { |
|---|
| 25 | public String UserName; |
|---|
| 26 | public SessionStartedEventArgs(String userName) |
|---|
| 27 | { |
|---|
| 28 | UserName = userName; |
|---|
| 29 | } |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | public abstract class CancelableEventArgs : EventArgs |
|---|
| 33 | { |
|---|
| 34 | public Boolean Cancel { get; set; } |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | public class TimelineStatusesEventArgs : CancelableEventArgs |
|---|
| 38 | { |
|---|
| 39 | public Statuses Statuses { get; private set; } |
|---|
| 40 | public Boolean IsFirstTime { get; set; } |
|---|
| 41 | |
|---|
| 42 | public TimelineStatusesEventArgs(Statuses statuses, Boolean isFirstTime) |
|---|
| 43 | { |
|---|
| 44 | Statuses = statuses; |
|---|
| 45 | IsFirstTime = isFirstTime; |
|---|
| 46 | } |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | public class TimelineStatusEventArgs : CancelableEventArgs |
|---|
| 50 | { |
|---|
| 51 | public Status Status { get; private set; } |
|---|
| 52 | public String Text { get; set; } |
|---|
| 53 | public String IRCMessageType { get; set; } |
|---|
| 54 | |
|---|
| 55 | public TimelineStatusEventArgs(Status status) : this(status, status.Text, "") |
|---|
| 56 | { |
|---|
| 57 | } |
|---|
| 58 | public TimelineStatusEventArgs(Status status, String text, String ircMessageType) |
|---|
| 59 | { |
|---|
| 60 | Status = status; |
|---|
| 61 | Text = text; |
|---|
| 62 | IRCMessageType = ircMessageType; |
|---|
| 63 | } |
|---|
| 64 | } |
|---|
| 65 | |
|---|
| 66 | public class StatusUpdateEventArgs : CancelableEventArgs |
|---|
| 67 | { |
|---|
| 68 | public PrivMsgMessage ReceivedMessage { get; set; } |
|---|
| 69 | public String Text { get; set; } |
|---|
| 70 | public Status CreatedStatus { get; set; } |
|---|
| 71 | |
|---|
| 72 | public StatusUpdateEventArgs(PrivMsgMessage receivedMessage, String text) |
|---|
| 73 | { |
|---|
| 74 | ReceivedMessage = receivedMessage; |
|---|
| 75 | Text = text; |
|---|
| 76 | } |
|---|
| 77 | } |
|---|
| 78 | } |
|---|