[Opensim-users] Web delivery

Justin Clark-Casey jjustincc at googlemail.com
Fri Oct 31 23:45:07 UTC 2014


You may want to look at 
OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveModule.UpdateClientWithLoadedNodes().

This is the method that tells the viewer about the new inventory folder/items after a "load iar".

In fact, you might be able to do this with less work by actually uploading an IAR, though you will have to be careful 
about security.  Assuming that your picture shows media on a prim here are my naive thoughts.

1) Extend RemoteAdmin [RADMIN] with an "admin_load_iar" command in the same fashion as the existing "admin_load_oar" 
command.  The admin_load_oar can only pick up from the filesystem (though this can also be an URL).  I'm not sure how 
easy this approach is to error handle (though it may be easier than load oar since it's not asynchronous).  If you do 
this then a patch for the command would be very welcome.

2) Encode the region UUID in the MOAP url.  Getting the user UUID is more complicated with no scripting.  Immediate 
thought is require them to have an account in the web application.

3) Either only allow them to pick individual folders or items with pre-created IARs, or create an IAR on the fly from an 
arbitrary selection (much more involved).  Either way the IAR has to end up in a location that all regions can access 
(e.g. a shared filesystem or an url).

4) Get the user's current region via the PresenceService getagents call [PRESENCE].

5) Use the GridService get_region_by_uuid call [GRID] to retrieve the server URI.  As RemoteAdmin has to run on a 
different port you will need to hardcode that part.

6) Use the URL to invoke admin_load_iar with the user uuid and iar location.

If you do end up simply adding inventory items directly, I recommend invoking service calls [SERVICES] rather than 
editing the database directly.  They are not very nice interfaces (being meant originally for OpenSim use only in many 
cases) but it would save you a lot of grief if the database changes or if one wanted to use an alternative service 
implementation that had the same interfaces but different storage structure.  I have some working example PHP for 
invoking services at [INTEGRATION] though at some point I need to make the connectors proper objects.

[GRID] http://opensimulator.org/wiki/GridService#get_region_by_uuid
[INTEGRATION] https://github.com/justincc/opensimulator-tools/tree/master/integration/php
[PRESENCE] http://opensimulator.org/wiki/PresenceService
[RADMIN] http://opensimulator.org/wiki/RemoteAdmin
[SERVICES] http://opensimulator.org/wiki/Services

On 31/10/14 08:37, Jeff Kelley wrote:
> I am looking for a way to programmatically create an inventory item such as it appears immediately, as in the case of
> llGiveInventory. It can be either in the avatar's inventory, or in an object's inventory (since the object can give to
> the avatar). It can't be assumed that the container be scripted, so it is not possible to use llGiveInventory.
>
> I can INSERT a row into database or POST to the InventoryService. The former needs the simulator to be stopped, and the
> later the avatar to relog. None meets the "immediate delivery" requirement.
>
> This would be used to deliver things from the web, as in the following application :
> http://www.pescadoo.net/tmp/texture_browser.png
>
> My avatar selects a ROBUST texture on a web page. The web then calls an object, passing the name and uuid of the
> texture. The box under is painted by uuid.
>
> Any idea?
>
>
> -- Jeff
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
> .
>


-- 
Justin Clark-Casey (justincc)
OSVW Consulting
http://justincc.org
http://twitter.com/justincc


More information about the Opensim-users mailing list