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/Avatar 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/Avatar Connector = == Overview == AvatarServicesConnector is the simulator-side remote connector for IAvatarService. It translates IAvatarService calls into HTTP POST requests to the ROBUST Avatar handler at /avatar. Source file: OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs ---- === Initialisation === Config section: [AvatarService] Required key: * AvatarServerURI -- URL of the ROBUST avatar 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 + "/avatar" using SynchronousRestFormsRequester. All requests include: * VERSIONMIN / VERSIONMAX -- protocol version negotiation * METHOD -- identifies the operation ---- === Methods === {| class="wikitable" ! Method !! METHOD field !! Notes |- | GetAvatar(userID) || "getavatar" || Returns AvatarData constructed from result dictionary; null on empty reply or missing result |- | GetAppearance(userID) || (none) || Calls GetAvatar(), then avatar.ToAvatarAppearance() |- | SetAvatar(userID, avatar) || "setavatar" || Serializes avatar via ToKeyValuePairs(); returns bool from result field |- | SetAppearance(userID, appearance) || (none) || Constructs AvatarData from AvatarAppearance, calls SetAvatar() |- | ResetAvatar(userID) || "resetavatar" || Returns bool from result field |- | SetItems(userID, names[], values[]) || "setitems" || Sends Names and Values as parallel List<string>; returns bool |- | RemoveItems(userID, names[]) || "removeitems" || Sends Names as List<string>; returns bool |} All write methods (SetAvatar, ResetAvatar, SetItems, RemoveItems) check replyData["result"].ToLower() == "success" and return false on empty reply, missing result field, or exception. ---- === Notes === * The log message in ResetAvatar() says "SetItems reply" in both the missing-result and empty-reply branches -- copy-paste error from SetItems(). The method itself is correct; only the log text is wrong. * ScopeID fields are present in the code but commented out throughout. ---- == See Also == * [[OpenSimulator Internals/Connector Architecture]] * [[OpenSimulator Internals/Code Map/ROBUST/AvatarService]] * [[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/Avatar Connector
(section)
Add topic