Ejemplo n.º 1
0
        // nn::friends::GetFriendList(int offset, nn::account::Uid userId, nn::friends::detail::ipc::SizedFriendFilter friendFilter, ulong pidPlaceHolder, pid)
        // -> int outCount, array<nn::friends::detail::FriendImpl, 0x6>
        public ResultCode GetFriendList(ServiceCtx context)
        {
            int offset = context.RequestData.ReadInt32();

            // Padding
            context.RequestData.ReadInt32();

            UserId       userId = context.RequestData.ReadStruct <UserId>();
            FriendFilter filter = context.RequestData.ReadStruct <FriendFilter>();

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

            if (userId.IsNull)
            {
                return(ResultCode.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 = userId.ToString(),
                offset,
                filter.PresenceStatus,
                filter.IsFavoriteOnly,
                filter.IsSameAppPresenceOnly,
                filter.IsSameAppPlayedOnly,
                filter.IsArbitraryAppPlayedOnly,
                filter.PresenceGroupId,
            });

            return(ResultCode.Success);
        }
Ejemplo n.º 2
0
        public FriendAdapter(Activity context, List <Profile> users, Profile currentUser)
        {
            mContext     = context;
            mUsers       = users;
            mCurrentUser = currentUser;

            Filter = new FriendFilter(this);
        }
Ejemplo n.º 3
0
 public void AddToEndOfChain(FriendFilter i_Handler)
 {
     m_LastHandlerInChain.NextHandler = i_Handler;
     m_LastHandlerInChain             = i_Handler;
 }
Ejemplo n.º 4
0
 public FriendFilter(IFilterStrategy i_FilterStrategy)
 {
     r_FilterStrategy     = i_FilterStrategy;
     m_LastHandlerInChain = this;
 }