OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Protected Attributes | List of all members
OpenSim.Services.AssetService.AssetService Class Reference
Inheritance diagram for OpenSim.Services.AssetService.AssetService:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Services.AssetService.AssetService:
Collaboration graph
[legend]

Public Member Functions

 AssetService (IConfigSource config)
 
 AssetService (IConfigSource config, string configName)
 
virtual AssetBase Get (string id)
 Get an asset synchronously. More...
 
virtual AssetBase GetCached (string id)
 Synchronously fetches an asset from the local cache only. More...
 
virtual AssetMetadata GetMetadata (string id)
 Get an asset's metadata More...
 
virtual byte[] GetData (string id)
 Get an asset's data, ignoring the metadata. More...
 
virtual bool Get (string id, Object sender, AssetRetrieved handler)
 Get an asset synchronously or asynchronously (depending on whether it is locally cached) and fire a callback with the fetched asset More...
 
virtual bool[] AssetsExist (string[] ids)
 Check if assets exist in the database. More...
 
virtual string Store (AssetBase asset)
 Creates a new asset More...
 
bool UpdateContent (string id, byte[] data)
 Update an asset's content More...
 
virtual bool Delete (string id)
 Delete an asset More...
 
- Public Member Functions inherited from OpenSim.Services.AssetService.AssetServiceBase
 AssetServiceBase (IConfigSource config)
 
 AssetServiceBase (IConfigSource config, string configName)
 
- Public Member Functions inherited from OpenSim.Services.Base.ServiceBase
LoadPlugin< T > (string dllName)
 
LoadPlugin< T > (string dllName, Object[] args)
 
LoadPlugin< T > (string dllName, string className, Object[] args)
 
 ServiceBase (IConfigSource config)
 

Static Protected Attributes

static AssetService m_RootInstance
 

Additional Inherited Members

- Protected Attributes inherited from OpenSim.Services.AssetService.AssetServiceBase
IAssetDataPlugin m_Database = null
 
IAssetLoader m_AssetLoader = null
 
string m_ConfigName = "AssetService"
 

Detailed Description

Definition at line 41 of file AssetService.cs.

Constructor & Destructor Documentation

OpenSim.Services.AssetService.AssetService.AssetService ( IConfigSource  config)
inline

Definition at line 49 of file AssetService.cs.

OpenSim.Services.AssetService.AssetService.AssetService ( IConfigSource  config,
string  configName 
)
inline

Definition at line 54 of file AssetService.cs.

Member Function Documentation

virtual bool [] OpenSim.Services.AssetService.AssetService.AssetsExist ( string[]  ids)
inlinevirtual

Check if assets exist in the database.

Parameters
idsThe assets' IDs
Returns
For each asset: true if it exists, false otherwise

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 156 of file AssetService.cs.

virtual bool OpenSim.Services.AssetService.AssetService.Delete ( string  id)
inlinevirtual

Delete an asset

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Reimplemented in OpenSim.Services.HypergridService.HGAssetService.

Definition at line 196 of file AssetService.cs.

virtual AssetBase OpenSim.Services.AssetService.AssetService.Get ( string  id)
inlinevirtual

Get an asset synchronously.

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Reimplemented in OpenSim.Services.HypergridService.HGAssetService.

Definition at line 95 of file AssetService.cs.

virtual bool OpenSim.Services.AssetService.AssetService.Get ( string  id,
Object  sender,
AssetRetrieved  handler 
)
inlinevirtual

Get an asset synchronously or asynchronously (depending on whether it is locally cached) and fire a callback with the fetched asset

Parameters
idThe asset id
senderRepresents the requester. Passed back via the handler
handlerThe handler to call back once the asset has been retrieved. This will be called back with a null AssetBase if the asset could not be found for some reason (e.g. if it does not exist, if a remote asset service was not contactable, if it is not in the database, etc.).
Returns
True if the id was parseable, false otherwise

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 147 of file AssetService.cs.

virtual AssetBase OpenSim.Services.AssetService.AssetService.GetCached ( string  id)
inlinevirtual

Synchronously fetches an asset from the local cache only.

Parameters
idAsset ID
Returns
The fetched asset, or null if it did not exist in the local cache

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 118 of file AssetService.cs.

virtual byte [] OpenSim.Services.AssetService.AssetService.GetData ( string  id)
inlinevirtual

Get an asset's data, ignoring the metadata.

Parameters
id
Returns
null if there is no such asset

Implements OpenSim.Services.Interfaces.IAssetService.

Reimplemented in OpenSim.Services.HypergridService.HGAssetService.

Definition at line 135 of file AssetService.cs.

virtual AssetMetadata OpenSim.Services.AssetService.AssetService.GetMetadata ( string  id)
inlinevirtual

Get an asset's metadata

Parameters
id
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Reimplemented in OpenSim.Services.HypergridService.HGAssetService.

Definition at line 123 of file AssetService.cs.

virtual string OpenSim.Services.AssetService.AssetService.Store ( AssetBase  asset)
inlinevirtual

Creates a new asset

Returns a random ID if none is passed via the asset argument.

Parameters
asset
Returns
The Asset ID, or string.Empty if an error occurred

Implements OpenSim.Services.Interfaces.IAssetService.

Reimplemented in OpenSim.Services.HypergridService.HGAssetService.

Definition at line 170 of file AssetService.cs.

bool OpenSim.Services.AssetService.AssetService.UpdateContent ( string  id,
byte[]  data 
)
inline

Update an asset's content

Attachments and bare scripts need this!!

Parameters
id
data
Returns

Implements OpenSim.Services.Interfaces.IAssetService.

Definition at line 191 of file AssetService.cs.

Member Data Documentation

AssetService OpenSim.Services.AssetService.AssetService.m_RootInstance
staticprotected

Definition at line 47 of file AssetService.cs.


The documentation for this class was generated from the following file: