Ejemplo n.º 1
0
        /// <summary>处理搜索用户的回复包
        /// Processes the search user reply.
        /// </summary>
        /// <param name="inPacket">The in packet.</param>
        /// <param name="outPacket">The out packet.</param>
        private void ProcessSearchUserReply(SearchUserReplyPacket inPacket, SearchUserPacket outPacket)
        {
            QQEventArgs <SearchUserReplyPacket, SearchUserPacket> e = new QQEventArgs <SearchUserReplyPacket, SearchUserPacket>(client, inPacket, outPacket);

            client.FriendManager.OnSearchUserSuccessed(e);
        }
Ejemplo n.º 2
0
        /// <summary>处理用户属性回复包
        /// Pocesses the user property op reply.
        /// </summary>
        /// <param name="inPacket">The in packet.</param>
        /// <param name="outPacket">The out packet.</param>
        private void PocessUserPropertyOpReply(UserPropertyOpReplyPacket inPacket, UserPropertyOpPacket outPacket)
        {
            QQEventArgs <UserPropertyOpReplyPacket, UserPropertyOpPacket> e = new QQEventArgs <UserPropertyOpReplyPacket, UserPropertyOpPacket>(client, inPacket, outPacket);

            client.FriendManager.OnGetUserPropertySuccess(e);
        }
Ejemplo n.º 3
0
        /// <summary>处理好友等级回复包
        /// Processes the friend level op reply.
        /// </summary>
        /// <param name="inPacket">The in packet.</param>
        /// <param name="outPacket">The out packet.</param>
        private void ProcessFriendLevelOpReply(FriendLevelOpReplyPacket inPacket, FriendLevelOpPacket outPacket)
        {
            QQEventArgs <FriendLevelOpReplyPacket, FriendLevelOpPacket> e = new QQEventArgs <FriendLevelOpReplyPacket, FriendLevelOpPacket>(client, inPacket, outPacket);

            client.FriendManager.OnGetFriendLevelSuccessed(e);
        }
Ejemplo n.º 4
0
        /// <summary> 处理认证信息的回复包
        ///     <remark>abu 2008-03-12 </remark>
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void ProcessAddFriendAuthReply(AddFriendAuthResponseReplyPacket inPacket, AddFriendAuthResponsePacket outPacket)
        {
            QQEventArgs <AddFriendAuthResponseReplyPacket, AddFriendAuthResponsePacket> e = new QQEventArgs <AddFriendAuthResponseReplyPacket, AddFriendAuthResponsePacket>(client, inPacket, outPacket);

            if (inPacket.ReplyCode != ReplyCode.ADD_FRIEND_AUTH_OK)
            {
                client.FriendManager.OnResponseAuthFailed(e);
            }
            else
            {
                client.FriendManager.OnResponseAuthSuccessed(e);
            }
        }
Ejemplo n.º 5
0
        /// <summary>处理好友状态改变事件
        ///     <remark>abu 2008-03-12 </remark>
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void ProcessFriendChangeStatus(FriendChangeStatusPacket packet)
        {
            QQEventArgs <FriendChangeStatusPacket, OutPacket> e = new QQEventArgs <FriendChangeStatusPacket, OutPacket>(client, packet, null);

            client.FriendManager.OnFriendChangeStatus(e);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 处理接收信息
        ///     <remark>abu 2008-03-10 </remark>
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void ProcessReceiveIM(ReceiveIMPacket packet)
        {
            QQEventArgs <ReceiveIMPacket, OutPacket> e = new QQEventArgs <ReceiveIMPacket, OutPacket>(client, packet, null);

            //先发送接收确认
            client.MessageManager.SendReceiveReplyPacket(packet);
            if (packet.IsDuplicated)
            {
                client.MessageManager.OnReceiveDuplicatedIM(e);
                return;
            }
            switch (packet.Header.Type)
            {
            case RecvSource.FRIEND:
            case RecvSource.STRANGER:
                switch (packet.NormalHeader.Type)
                {
                case NormalIMType.TEXT:
                    client.MessageManager.OnReceiveNormalIM(e);
                    break;

                case NormalIMType.TCP_REQUEST:
                    break;

                case NormalIMType.ACCEPT_TCP_REQUEST:
                    break;

                case NormalIMType.REJECT_TCP_REQUEST:
                    break;

                case NormalIMType.UDP_REQUEST:
                    break;

                case NormalIMType.ACCEPT_UDP_REQUEST:
                    break;

                case NormalIMType.REJECT_UDP_REQUEST:
                    break;

                case NormalIMType.NOTIFY_IP:
                    break;

                case NormalIMType.ARE_YOU_BEHIND_FIREWALL:
                    break;

                case NormalIMType.ARE_YOU_BEHIND_PROXY:
                    break;

                case NormalIMType.YES_I_AM_BEHIND_PROXY:
                    break;

                case NormalIMType.NOTIFY_FILE_AGENT_INFO:
                    break;

                case NormalIMType.REQUEST_CANCELED:
                    break;

                default:
                    client.MessageManager.OnReceiveUnknownIM(e);
                    break;
                }
                break;

            case RecvSource.BIND_USER:
                break;

            case RecvSource.MOBILE:
                break;

            case RecvSource.MEMBER_LOGIN_HINT:
                break;

            case RecvSource.MOBILE_QQ:
                break;

            case RecvSource.MOBILE_QQ_2:
                break;

            case RecvSource.QQLIVE:
                break;

            case RecvSource.PROPERTY_CHANGE:
                client.FriendManager.OnUserPropertyChanged(e);
                break;

            case RecvSource.TEMP_SESSION:
                client.MessageManager.OnReceiveTempSessionIM(e);
                break;

            case RecvSource.UNKNOWN_CLUSTER:
                break;

            case RecvSource.ADDED_TO_CLUSTER:
                break;

            case RecvSource.DELETED_FROM_CLUSTER:
                break;

            case RecvSource.REQUEST_JOIN_CLUSTER:
                break;

            case RecvSource.APPROVE_JOIN_CLUSTER:
                break;

            case RecvSource.REJECT_JOIN_CLUSTER:
                break;

            case RecvSource.CREATE_CLUSTER:
                break;

            case RecvSource.TEMP_CLUSTER:
                break;

            case RecvSource.CLUSTER:
                break;

            case RecvSource.CLUSTER_NOTIFICATION:
                break;

            case RecvSource.SYS_MESSAGE:
                if (packet.SystemMessageType == SystemIMType.QQ_RECV_IM_KICK_OUT)
                {
                    client.MessageManager.OnReceiveKickOut(e);
                }
                else
                {
                    client.MessageManager.OnReceiveSysMessage(e);
                }
                break;

            case RecvSource.SIGNATURE_CHANGE:
                client.FriendManager.OnSignatureChanged(e);
                break;

            case RecvSource.CUSTOM_HEAD_CHANGE:
                break;

            default:
                break;
            }
        }