public InventoryFolderBase QueryFolder(string id, InventoryFolderBase folder, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.QueryFolder(userID, folder, sessionID)); } return(null); }
public int GetAssetPermissions(string id, UUID assetID, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.GetAssetPermissions(userID, assetID, sessionID)); } return(0); }
public bool DeleteItems(string id, List <UUID> itemIDs, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.DeleteItems(userID, itemIDs, sessionID)); } return(false); }
public List <InventoryItemBase> GetFolderItems(string id, UUID folderID, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.GetFolderItems(userID, folderID, sessionID)); } return(new List <InventoryItemBase>()); }
public bool UpdateItem(string id, InventoryItemBase item, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.UpdateItem(userID, item, sessionID)); } return(false); }
public void GetUserInventory(string id, UUID sessionID, InventoryReceiptCallback callback) { m_log.Debug("[HGInventory]: GetUserInventory " + id); string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); connector.GetUserInventory(userID, sessionID, callback); } }
public InventoryItemBase QueryItem(string id, InventoryItemBase item, UUID sessionID) { string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { //m_log.DebugFormat("[HGInventory CONNECTOR]: calling {0}", url); ISessionAuthInventoryService connector = GetConnector(url); return(connector.QueryItem(userID, item, sessionID)); } return(null); }
/// <summary> /// Gets everything (folders and items) inside a folder /// </summary> /// <param name="userId"></param> /// <param name="folderID"></param> /// <returns></returns> public InventoryCollection GetFolderContent(string id, UUID folderID, UUID sessionID) { m_log.Debug("[HGInventory]: GetFolderContent " + id); string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.GetFolderContent(userID, folderID, sessionID)); } return(null); }
/// <summary> /// Gets the user folder for the given folder-type /// </summary> /// <param name="userID"></param> /// <param name="type"></param> /// <returns></returns> public Dictionary <AssetType, InventoryFolderBase> GetSystemFolders(string id, UUID sessionID) { m_log.Debug("[HGInventory]: GetSystemFolders " + id); string url = string.Empty; string userID = string.Empty; if (StringToUrlAndUserID(id, out url, out userID)) { ISessionAuthInventoryService connector = GetConnector(url); return(connector.GetSystemFolders(userID, sessionID)); } return(new Dictionary <AssetType, InventoryFolderBase>()); }
public void Initialise(IConfigSource source) { if (!m_Initialized) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("InventoryServices", ""); if (name == Name) { IConfig inventoryConfig = source.Configs["InventoryService"]; if (inventoryConfig == null) { m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); return; } string localDll = inventoryConfig.GetString("LocalGridInventoryService", String.Empty); string HGDll = inventoryConfig.GetString("HypergridInventoryService", String.Empty); if (localDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } if (HGDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No HypergridInventoryService named in section InventoryService"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } Object[] args = new Object[] { source }; m_GridService = ServerUtils.LoadPlugin<IInventoryService>(localDll, args); m_HGService = ServerUtils.LoadPlugin<ISessionAuthInventoryService>(HGDll, args); if (m_GridService == null) { m_log.Error("[HG INVENTORY CONNECTOR]: Can't load local inventory service"); return; } if (m_HGService == null) { m_log.Error("[HG INVENTORY CONNECTOR]: Can't load hypergrid inventory service"); return; } Init(source); m_Enabled = true; m_log.Info("[HG INVENTORY CONNECTOR]: HG inventory broker enabled"); } } m_Initialized = true; } }
public void Initialise(IConfigSource source) { IConfig moduleConfig = source.Configs["Modules"]; if (moduleConfig != null) { string name = moduleConfig.GetString("InventoryServices", ""); if (name == Name) { IConfig inventoryConfig = source.Configs["InventoryService"]; if (inventoryConfig == null) { m_log.Error("[HG INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini"); return; } string localDll = inventoryConfig.GetString("LocalGridInventoryService", String.Empty); string HGDll = inventoryConfig.GetString("HypergridInventoryService", String.Empty); if (localDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No LocalGridInventoryService named in section InventoryService"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } if (HGDll == String.Empty) { m_log.Error("[HG INVENTORY CONNECTOR]: No HypergridInventoryService named in section InventoryService"); //return; throw new Exception("Unable to proceed. Please make sure your ini files in config-include are updated according to .example's"); } Object[] args = new Object[] { source }; m_GridService = ServerUtils.LoadPlugin <IInventoryService>(localDll, args); m_HGService = ServerUtils.LoadPlugin <ISessionAuthInventoryService>(HGDll, args); if (m_GridService == null) { m_log.Error("[HG INVENTORY CONNECTOR]: Can't load local inventory service"); return; } if (m_HGService == null) { m_log.Error("[HG INVENTORY CONNECTOR]: Can't load hypergrid inventory service"); return; } m_LocalGridInventoryURI = inventoryConfig.GetString("InventoryServerURI", string.Empty); m_Enabled = true; m_log.Info("[HG INVENTORY CONNECTOR]: HG inventory broker enabled"); } } }