From 3615a70cae3f89197fe185dfc5d0a47fa42151d9 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 4 Dec 2018 22:52:39 -0200 Subject: Revert "Adjust naming conventions and general refactoring in HLE Project (#490)" (#526) This reverts commit 85dbb9559ad317a657dafd24da27fec4b3f5250f. --- Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs | 88 +++++++++++----------- Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs | 10 +-- 2 files changed, 49 insertions(+), 49 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Friend') diff --git a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs b/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs index 98348125..e20de267 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/IFriendService.cs @@ -8,13 +8,13 @@ namespace Ryujinx.HLE.HOS.Services.Friend { class IFriendService : IpcService { - private Dictionary _commands; + private Dictionary m_Commands; - public override IReadOnlyDictionary Commands => _commands; + public override IReadOnlyDictionary Commands => m_Commands; public IFriendService() { - _commands = new Dictionary + m_Commands = new Dictionary() { { 10101, GetFriendList }, { 10601, DeclareCloseOnlinePlaySession }, @@ -23,76 +23,76 @@ namespace Ryujinx.HLE.HOS.Services.Friend } // nn::friends::GetFriendListGetFriendListIds(nn::account::Uid, int Unknown0, nn::friends::detail::ipc::SizedFriendFilter, ulong Unknown1) -> int CounterIds, array - public long GetFriendList(ServiceCtx context) + public long GetFriendList(ServiceCtx Context) { - UInt128 uuid = new UInt128( - context.RequestData.ReadInt64(), - context.RequestData.ReadInt64()); + UInt128 Uuid = new UInt128( + Context.RequestData.ReadInt64(), + Context.RequestData.ReadInt64()); - int unknown0 = context.RequestData.ReadInt32(); + int Unknown0 = Context.RequestData.ReadInt32(); - FriendFilter filter = new FriendFilter + FriendFilter Filter = new FriendFilter() { - PresenceStatus = (PresenceStatusFilter)context.RequestData.ReadInt32(), - IsFavoriteOnly = context.RequestData.ReadBoolean(), - IsSameAppPresenceOnly = context.RequestData.ReadBoolean(), - IsSameAppPlayedOnly = context.RequestData.ReadBoolean(), - IsArbitraryAppPlayedOnly = context.RequestData.ReadBoolean(), - PresenceGroupId = context.RequestData.ReadInt64() + PresenceStatus = (PresenceStatusFilter)Context.RequestData.ReadInt32(), + IsFavoriteOnly = Context.RequestData.ReadBoolean(), + IsSameAppPresenceOnly = Context.RequestData.ReadBoolean(), + IsSameAppPlayedOnly = Context.RequestData.ReadBoolean(), + IsArbitraryAppPlayedOnly = Context.RequestData.ReadBoolean(), + PresenceGroupId = Context.RequestData.ReadInt64() }; - long unknown1 = context.RequestData.ReadInt64(); + long Unknown1 = Context.RequestData.ReadInt64(); // There are no friends online, so we return 0 because the nn::account::NetworkServiceAccountId array is empty. - context.ResponseData.Write(0); - - Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. UserId: {uuid.ToString()} - " + - $"Unknown0: {unknown0} - " + - $"PresenceStatus: {filter.PresenceStatus} - " + - $"IsFavoriteOnly: {filter.IsFavoriteOnly} - " + - $"IsSameAppPresenceOnly: {filter.IsSameAppPresenceOnly} - " + - $"IsSameAppPlayedOnly: {filter.IsSameAppPlayedOnly} - " + - $"IsArbitraryAppPlayedOnly: {filter.IsArbitraryAppPlayedOnly} - " + - $"PresenceGroupId: {filter.PresenceGroupId} - " + - $"Unknown1: {unknown1}"); + Context.ResponseData.Write(0); + + Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. UserId: {Uuid.ToString()} - " + + $"Unknown0: {Unknown0} - " + + $"PresenceStatus: {Filter.PresenceStatus} - " + + $"IsFavoriteOnly: {Filter.IsFavoriteOnly} - " + + $"IsSameAppPresenceOnly: {Filter.IsSameAppPresenceOnly} - " + + $"IsSameAppPlayedOnly: {Filter.IsSameAppPlayedOnly} - " + + $"IsArbitraryAppPlayedOnly: {Filter.IsArbitraryAppPlayedOnly} - " + + $"PresenceGroupId: {Filter.PresenceGroupId} - " + + $"Unknown1: {Unknown1}"); return 0; } // DeclareCloseOnlinePlaySession(nn::account::Uid) - public long DeclareCloseOnlinePlaySession(ServiceCtx context) + public long DeclareCloseOnlinePlaySession(ServiceCtx Context) { - UInt128 uuid = new UInt128( - context.RequestData.ReadInt64(), - context.RequestData.ReadInt64()); + UInt128 Uuid = new UInt128( + Context.RequestData.ReadInt64(), + Context.RequestData.ReadInt64()); - if (context.Device.System.State.TryGetUser(uuid, out UserProfile profile)) + if (Context.Device.System.State.TryGetUser(Uuid, out UserProfile Profile)) { - profile.OnlinePlayState = OpenCloseState.Closed; + Profile.OnlinePlayState = OpenCloseState.Closed; } - Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {uuid.ToString()} - " + - $"OnlinePlayState: {profile.OnlinePlayState}"); + Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {Uuid.ToString()} - " + + $"OnlinePlayState: {Profile.OnlinePlayState}"); return 0; } // UpdateUserPresence(nn::account::Uid, ulong Unknown0) -> buffer - public long UpdateUserPresence(ServiceCtx context) + public long UpdateUserPresence(ServiceCtx Context) { - UInt128 uuid = new UInt128( - context.RequestData.ReadInt64(), - context.RequestData.ReadInt64()); + UInt128 Uuid = new UInt128( + Context.RequestData.ReadInt64(), + Context.RequestData.ReadInt64()); - long unknown0 = context.RequestData.ReadInt64(); + long Unknown0 = Context.RequestData.ReadInt64(); - long position = context.Request.PtrBuff[0].Position; - long size = context.Request.PtrBuff[0].Size; + long Position = Context.Request.PtrBuff[0].Position; + long Size = Context.Request.PtrBuff[0].Size; //Todo: Write the buffer content. - Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {uuid.ToString()} - " + - $"Unknown0: {unknown0}"); + Logger.PrintStub(LogClass.ServiceFriend, $"Stubbed. Uuid: {Uuid.ToString()} - " + + $"Unknown0: {Unknown0}"); return 0; } diff --git a/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs b/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs index d7f99997..065e230d 100644 --- a/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs +++ b/Ryujinx.HLE/HOS/Services/Friend/IServiceCreator.cs @@ -5,21 +5,21 @@ namespace Ryujinx.HLE.HOS.Services.Friend { class IServiceCreator : IpcService { - private Dictionary _commands; + private Dictionary m_Commands; - public override IReadOnlyDictionary Commands => _commands; + public override IReadOnlyDictionary Commands => m_Commands; public IServiceCreator() { - _commands = new Dictionary + m_Commands = new Dictionary() { { 0, CreateFriendService } }; } - public static long CreateFriendService(ServiceCtx context) + public static long CreateFriendService(ServiceCtx Context) { - MakeObject(context, new IFriendService()); + MakeObject(Context, new IFriendService()); return 0; } -- cgit v1.2.3