Esempio n. 1
0
        // nn::friends::GetFriendListGetFriendListIds(nn::account::Uid, int Unknown0, nn::friends::detail::ipc::SizedFriendFilter, ulong Unknown1) -> int CounterIds,  array<nn::account::NetworkServiceAccountId>
        public long GetFriendList(ServiceCtx context)
        {
            UInt128 uuid = new UInt128(
                context.RequestData.ReadInt64(),
                context.RequestData.ReadInt64());

            int unknown0 = context.RequestData.ReadInt32();

            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()
            };

            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}");

            return(0);
        }
Esempio n. 2
0
        // nn::friends::GetFriendList(int offset, nn::account::Uid userUUID, nn::friends::detail::ipc::SizedFriendFilter friendFilter, ulong pidPlaceHolder, pid)
        // -> int outCount, array<nn::friends::detail::FriendImpl, 0x6>
        public long GetFriendList(ServiceCtx context)
        {
            int offset = context.RequestData.ReadInt32();

            // Padding
            context.RequestData.ReadInt32();

            UInt128      uuid   = context.RequestData.ReadStruct <UInt128>();
            FriendFilter filter = context.RequestData.ReadStruct <FriendFilter>();

            // Pid placeholder
            context.RequestData.ReadInt64();

            if (uuid.IsNull)
            {
                return(MakeError(ErrorModule.Friends, FriendError.InvalidArgument));
            }

            // 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, new {
                UserId = uuid.ToString(),
                offset,
                filter.PresenceStatus,
                filter.IsFavoriteOnly,
                filter.IsSameAppPresenceOnly,
                filter.IsSameAppPlayedOnly,
                filter.IsArbitraryAppPlayedOnly,
                filter.PresenceGroupId,
            });

            return(0);
        }
Esempio n. 3
0
        // nn::friends::GetFriendListGetFriendListIds(nn::account::Uid, int Unknown0, nn::friends::detail::ipc::SizedFriendFilter, ulong Unknown1) -> int CounterIds,  array<nn::account::NetworkServiceAccountId>
        public long GetFriendList(ServiceCtx Context)
        {
            UserId Uuid = new UserId(
                Context.RequestData.ReadInt64(),
                Context.RequestData.ReadInt64());

            int Unknown0 = Context.RequestData.ReadInt32();

            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()
            };

            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);

            Context.Device.Log.PrintStub(LogClass.ServiceFriend, $"Stubbed. UserId: {Uuid.UserIdHex} - " +
                                         $"Unknown0: {Unknown0} - " +
                                         $"PresenceStatus: {Filter.PresenceStatus} - " +
                                         $"IsFavoriteOnly: {Filter.IsFavoriteOnly} - " +
                                         $"IsSameAppPresenceOnly: {Filter.IsSameAppPresenceOnly} - " +
                                         $"IsSameAppPlayedOnly: {Filter.IsSameAppPlayedOnly} - " +
                                         $"IsArbitraryAppPlayedOnly: {Filter.IsArbitraryAppPlayedOnly} - " +
                                         $"PresenceGroupId: {Filter.PresenceGroupId} - " +
                                         $"Unknown1: {Unknown1}");

            return(0);
        }