forked from LagrangeDev/Lagrange.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
25 changed files
with
689 additions
and
121 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Lagrange.Core.Event.EventArg; | ||
|
||
public class PinChangedEvent : EventBase | ||
{ | ||
public ChatType Type { get; } | ||
|
||
public uint Uin { get; } | ||
|
||
public bool IsPin { get; } | ||
|
||
public PinChangedEvent(ChatType type, uint uin, bool isPin) | ||
{ | ||
Type = type; | ||
Uin = uin; | ||
IsPin = isPin; | ||
|
||
EventMessage = $"{nameof(PinChangedEvent)} {{ChatType: {Type} | Uin: {Uin} | IsPin: {IsPin}}}"; | ||
} | ||
|
||
public enum ChatType | ||
{ | ||
Friend, | ||
Group, | ||
Service | ||
} | ||
} |
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
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,42 @@ | ||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class FetchPinsEvent : ProtocolEvent | ||
{ | ||
internal List<string> FriendUids { get; set; } | ||
|
||
public List<uint> FriendUins { get; set; } | ||
|
||
public List<uint> GroupUins { get; set; } | ||
|
||
public string Message { get; set; } | ||
|
||
protected FetchPinsEvent() : base(true) | ||
{ | ||
FriendUids = new(); | ||
FriendUins = new(); | ||
GroupUins = new(); | ||
Message = string.Empty; | ||
} | ||
|
||
protected FetchPinsEvent(List<string> friendUids, List<uint> groupUins) : base(0) | ||
{ | ||
FriendUids = friendUids; | ||
FriendUins = new(); | ||
GroupUins = groupUins; | ||
Message = string.Empty; | ||
} | ||
|
||
protected FetchPinsEvent(int retcode, string message) : base(retcode) | ||
{ | ||
FriendUids = new(); | ||
FriendUins = new(); | ||
GroupUins = new(); | ||
Message = string.Empty; | ||
} | ||
|
||
public static FetchPinsEvent Create() => new(); | ||
|
||
public static FetchPinsEvent Result(List<string> friendUids, List<uint> groupUins) => new(friendUids, groupUins); | ||
|
||
public static FetchPinsEvent Result(int retcode, string message) => new(retcode, message); | ||
} |
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,31 @@ | ||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class SetPinFriendEvent : ProtocolEvent | ||
{ | ||
internal string Uid { get; set; } | ||
|
||
public uint Uin { get; set; } | ||
|
||
public bool IsPin { get; set; } | ||
|
||
public string Message { get; set; } | ||
|
||
protected SetPinFriendEvent(uint uin, bool isPin) : base(true) | ||
{ | ||
Uid = string.Empty; | ||
Uin = uin; | ||
Message = string.Empty; | ||
IsPin = isPin; | ||
} | ||
|
||
protected SetPinFriendEvent(int retcode, string message) : base(retcode) | ||
{ | ||
Uid = string.Empty; | ||
Uin = 0; | ||
Message = message; | ||
} | ||
|
||
public static SetPinFriendEvent Create(uint uin, bool isPin) => new(uin, isPin); | ||
|
||
public static SetPinFriendEvent Result(int retcode, string message) => new(retcode, message); | ||
} |
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,27 @@ | ||
namespace Lagrange.Core.Internal.Event.Action; | ||
|
||
internal class SetPinGroupEvent : ProtocolEvent | ||
{ | ||
public uint Uin { get; set; } | ||
|
||
public bool IsPin { get; set; } | ||
|
||
public string Message { get; set; } | ||
|
||
protected SetPinGroupEvent(uint uin, bool isPin) : base(true) | ||
{ | ||
Uin = uin; | ||
Message = string.Empty; | ||
IsPin = isPin; | ||
} | ||
|
||
protected SetPinGroupEvent(int retcode, string message) : base(retcode) | ||
{ | ||
Uin = 0; | ||
Message = message; | ||
} | ||
|
||
public static SetPinGroupEvent Create(uint uin, bool isPin) => new(uin, isPin); | ||
|
||
public static SetPinGroupEvent Result(int retcode, string message) => new(retcode, message); | ||
} |
Oops, something went wrong.