Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Open Simulator Technical Help
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenSimulator Internals/Connector Architecture/Friends Connector
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= OpenSimulator Internals/Connector Architecture/Friends Connector = == Overview == FriendsServicesConnector is the simulator-side remote connector for IFriendsService. It translates IFriendsService calls into HTTP POST requests to the ROBUST Friends handler at /friends. Source file: OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs ---- === Initialisation === Config section: [FriendsService] Required key: * FriendsServerURI -- URL of the ROBUST friends endpoint; throws if missing Base class BaseServiceConnector.Initialise() called for auth setup. Three constructors: * Default (no args) -- URI must be set externally * String URI -- used by callers that pass the URI directly * IConfigSource -- calls Initialise(), normal grid mode ---- === Transport === All methods POST to m_ServerURI + "/friends" using SynchronousRestFormsRequester. Unlike most other connectors, requests do not include VERSIONMIN / VERSIONMAX fields. ---- === Methods === {| class="wikitable" ! Method !! METHOD field !! Notes |- | GetFriends(UUID principalID) || "getfriends" || UUID overload |- | GetFriends(string principalID) || "getfriends_string" || String overload -- used for HG UUI identifiers |- | StoreFriend(principalID, friend, flags) || "storefriend" || Sends PrincipalID, Friend, MyFlags; returns bool from Result field |- | Delete(UUID principalID, string friend) || "deletefriend" || UUID overload |- | Delete(string principalID, string friend) || "deletefriend_string" || String overload -- used for HG UUI identifiers |} GetFriends() (both overloads) delegate to a protected GetFriends(Dictionary, string) helper: * Returns empty FriendInfo[] if result == "null" * Iterates all values in reply dictionary, constructs FriendInfo for each dictionary entry * Returns empty FriendInfo[] on empty reply or exception (never returns null) StoreFriend() and Delete(): * Check replyData["Result"] (capital R -- different from most other connectors which use lowercase "result") * Parse as bool via Boolean.TryParse() * Return false on empty reply, null response, or exception ---- === Notes === * Two string overloads exist (GetFriends, Delete) to support HyperGrid UUI identifiers which are not valid UUIDs. * Result field key is "Result" (capital R) -- inconsistent with most other ROBUST service connectors which use lowercase "result". * No VERSIONMIN/VERSIONMAX sent -- unlike GridUser, Presence, Avatar, and UserAccount connectors. * GetFriends() returns empty array (not null) on all failure paths. ---- == See Also == * [[OpenSimulator Internals/Connector Architecture]] * [[OpenSimulator Internals/Code Map/ROBUST]] * [[OpenSimulator Internals/Code Map/Shared]]
Summary:
Please note that all contributions to Open Simulator Technical Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Open Simulator Technical Help:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OpenSimulator Internals/Connector Architecture/Friends Connector
(section)
Add topic