C# Class OpenMetaverse.FriendsManager

This class is used to add and remove avatars from your friends list and to manage their permission.
Afficher le fichier Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Méthodes publiques

Свойство Type Description
FriendList FriendInfo>.InternalDictionary
FriendRequests UUID>.InternalDictionary

Méthodes publiques

Méthode Description
AcceptFriendship ( UUID fromAgentID, UUID imSessionID ) : void

Accept a friendship request

DeclineFriendship ( UUID fromAgentID, UUID imSessionID ) : void

Decline a friendship request

GrantRights ( UUID friendID, FriendRights rights ) : void

Change the rights of a friend avatar.

This method will implicitly set the rights to those passed in the rights parameter.

MapFriend ( UUID friendID ) : void

Use to map a friends location on the grid.

E:OnFriendFound

OfferFriendship ( UUID agentID ) : void

Offer friendship to an avatar.

OnFindAgentReplyHandler ( Packet packet, Simulator simulator ) : void

Handle friend location updates

TerminateFriendship ( UUID agentID ) : void

Terminate a friendship with an avatar

TrackFriend ( UUID friendID ) : void

Use to track a friends movement on the grid

Private Methods

Méthode Description
Avatars_OnAvatarNames ( string>.Dictionary names ) : void

This handles the asynchronous response of a RequestAvatarNames call.

ChangeUserRightsHandler ( Packet packet, Simulator simulator ) : void

Handle notifications sent when a friend rights change. This notification is also received when my own rights change.

FriendsManager ( GridClient client ) : System

Internal constructor

MainAvatar_InstantMessage ( InstantMessage im, Simulator simulator ) : void

Handles relevant messages from the server encapsulated in instant messages.

Network_OnConnect ( object sender ) : void

Called when a connection to the SL server is established. The list of friend avatars is populated from XML returned by the login server. That list contains the avatar's id and right, but no names. Here is where those names are requested.

Network_OnLoginResponse ( bool loginSuccess, bool redirect, string message, string reason, LoginResponseData replyData ) : void
OfflineNotificationHandler ( Packet packet, Simulator simulator ) : void

Handle notifications sent when a friends has gone offline.

OnlineNotificationHandler ( Packet packet, Simulator simulator ) : void

Handle notifications sent when a friends has come online.

TerminateFriendshipHandler ( Packet packet, Simulator simulator ) : void

Fired when another friend terminates friendship. We need to remove them from our cached list.

Method Details

AcceptFriendship() public méthode

Accept a friendship request
public AcceptFriendship ( UUID fromAgentID, UUID imSessionID ) : void
fromAgentID UUID agentID of avatatar to form friendship with
imSessionID UUID imSessionID of the friendship request message
Résultat void

DeclineFriendship() public méthode

Decline a friendship request
public DeclineFriendship ( UUID fromAgentID, UUID imSessionID ) : void
fromAgentID UUID of friend
imSessionID UUID imSessionID of the friendship request message
Résultat void

GrantRights() public méthode

Change the rights of a friend avatar.
This method will implicitly set the rights to those passed in the rights parameter.
public GrantRights ( UUID friendID, FriendRights rights ) : void
friendID UUID the of the friend
rights FriendRights the new rights to give the friend
Résultat void

MapFriend() public méthode

Use to map a friends location on the grid.
E:OnFriendFound
public MapFriend ( UUID friendID ) : void
friendID UUID Friends UUID to find
Résultat void

OfferFriendship() public méthode

Offer friendship to an avatar.
public OfferFriendship ( UUID agentID ) : void
agentID UUID System ID of the avatar you are offering friendship to
Résultat void

OnFindAgentReplyHandler() public méthode

Handle friend location updates
public OnFindAgentReplyHandler ( Packet packet, Simulator simulator ) : void
packet OpenMetaverse.Packets.Packet The Packet
simulator Simulator The Simulator
Résultat void

TerminateFriendship() public méthode

Terminate a friendship with an avatar
public TerminateFriendship ( UUID agentID ) : void
agentID UUID System ID of the avatar you are terminating the friendship with
Résultat void

TrackFriend() public méthode

Use to track a friends movement on the grid
public TrackFriend ( UUID friendID ) : void
friendID UUID Friends Key
Résultat void

Property Details

FriendList public_oe property

A dictionary of key/value pairs containing known friends of this avatar. The Key is the UUID of the friend, the value is a FriendInfo object that contains detailed information including permissions you have and have given to the friend
public InternalDictionary FriendList
Résultat FriendInfo>.InternalDictionary

FriendRequests public_oe property

A Dictionary of key/value pairs containing current pending frienship offers. The key is the UUID of the avatar making the request, the value is the UUID of the request which is used to accept or decline the friendship offer
public InternalDictionary FriendRequests
Résultat UUID>.InternalDictionary