Examples of FriendInfo


Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

            request.FolderData[0] = new AcceptFriendshipPacket.FolderDataBlock();
            request.FolderData[0].FolderID = callingCardFolder;

            Client.network.SendPacket(request);

            FriendInfo friend = new FriendInfo(fromAgentID, FriendRights.get(FriendRights.CanSeeOnline.getIndex()),
                FriendRights.get(FriendRights.CanSeeOnline.getIndex()));

            if (!FriendList.containsKey(fromAgentID))
                FriendList.add(friend.getUUID(), friend);

            if (FriendRequests.containsKey(fromAgentID))
                FriendRequests.remove(fromAgentID);

            Client.avatars.RequestAvatarName(fromAgentID);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

        {
            Map<UUID, String> newNames = new HashMap<UUID, String>();

            for (Entry<UUID, String> kvp : e.getNames().entrySet())
            {
                FriendInfo friend;
                synchronized (FriendList.getDictionary())
                {
                    if ((friend = FriendList.get(kvp.getKey()))!=null)
                    {
                        if (friend.getName() == null)
                            newNames.put(kvp.getKey(), kvp.getValue());

                        friend.setName(kvp.getValue());
                        FriendList.add(kvp.getKey(), friend);
                    }
                }
            }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

            {
                OnlineNotificationPacket notification = ((OnlineNotificationPacket)packet);

                for (OnlineNotificationPacket.AgentBlockBlock block : notification.AgentBlock)
                {
                    FriendInfo friend;
                    synchronized (FriendList.getDictionary())
                    {
                        if (!FriendList.containsKey(block.AgentID))
                        {
                            friend = new FriendInfo(block.AgentID, FriendRights.get(FriendRights.CanSeeOnline.getIndex()),
                                FriendRights.get(FriendRights.CanSeeOnline.getIndex()));
                            FriendList.add(block.AgentID, friend);
                        }
                        else
                        {
                            friend = FriendList.get(block.AgentID);
                        }
                    }

                    boolean doNotify = !friend.isOnline();
                    friend.setIsOnline(true);

                    if (onFriendOnline != null && doNotify)
                    {
                        onFriendOnline.raiseEvent(new FriendInfoEventArgs(friend));
                    }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

            {
                OfflineNotificationPacket notification = (OfflineNotificationPacket)packet;

                for (OfflineNotificationPacket.AgentBlockBlock block : notification.AgentBlock)
                {
                    FriendInfo friend = new FriendInfo(block.AgentID, FriendRights.get(FriendRights.CanSeeOnline.getIndex()),
                        FriendRights.get(FriendRights.CanSeeOnline.getIndex()));

                    synchronized (FriendList.getDictionary())
                    {
                        if (!FriendList.containsKey(block.AgentID))
                            FriendList.add(block.AgentID, friend);

                        friend = FriendList.get(block.AgentID);
                    }

                    friend.setIsOnline(false);

                    if (onFriendOffline != null)
                    {
                        onFriendOffline.raiseEvent(new FriendInfoEventArgs(friend));
                    }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

        private void ChangeUserRightsHandler(Object sender, PacketReceivedEventArgs e)
        {
            Packet packet = e.getPacket();
            if (packet.Type == PacketType.ChangeUserRights)
            {
                FriendInfo friend;
                ChangeUserRightsPacket rights = (ChangeUserRightsPacket)packet;

                for (ChangeUserRightsPacket.RightsBlock block : rights.Rights)
                {
                    EnumSet<FriendRights> newRights = FriendRights.get(block.RelatedRights);
                    if ((friend = FriendList.get(block.AgentRelated) )!= null)
                    {
                        friend.setTheirFriendRights(newRights);
                        if (onFriendRightsUpdate != null)
                        {
                          onFriendRightsUpdate.raiseEvent(new FriendInfoEventArgs(friend));
                        }
                    }
                    else if (block.AgentRelated.equals(Client.self.getAgentID()))
                    {
                        if (( friend = FriendList.get(rights.AgentData.AgentID))!=null)
                        {
                            friend.setMyFriendRights(newRights);
                            if (onFriendRightsUpdate != null)
                            {
                              onFriendRightsUpdate.raiseEvent(new FriendInfoEventArgs(friend));
                            }
                        }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

                    onFriendshipOffered.raiseEvent(new FriendshipOfferedEventArgs(e.getIM().FromAgentID, e.getIM().FromAgentName, e.getIM().IMSessionID));
                }
            }
            else if (e.getIM().Dialog == InstantMessageDialog.FriendshipAccepted)
            {
                FriendInfo friend = new FriendInfo(e.getIM().FromAgentID, FriendRights.get(FriendRights.CanSeeOnline.getIndex()),
                    FriendRights.get(FriendRights.CanSeeOnline.getIndex()));
                friend.setName( e.getIM().FromAgentName);
                synchronized (FriendList.getDictionary())
                {FriendList.add(friend.getUUID(), friend);}

                if (onFriendshipResponse != null)
                {
                    onFriendshipResponse.raiseEvent(new FriendshipResponseEventArgs(e.getIM().FromAgentID, e.getIM().FromAgentName, true));
                }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.friends.FriendInfo

                    {
                        synchronized (FriendList.getDictionary())
                        {
                            if (!FriendList.containsKey(bubid))
                            {
                                FriendList.add(bubid, new FriendInfo(bubid,
                                    FriendRights.get(buddy.buddy_rights_given),
                                    FriendRights.get(buddy.buddy_rights_has)));
                            }
                        }
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.