diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 36 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 19 |
4 files changed, 65 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 03600e2..2b9913c 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -798,6 +798,11 @@ namespace OpenSim.Data.MSSQL | |||
798 | m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message); | 798 | m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message); |
799 | } | 799 | } |
800 | } | 800 | } |
801 | |||
802 | public List<InventoryItemBase> fetchActiveGestures (UUID avatarID) | ||
803 | { | ||
804 | return null; | ||
805 | } | ||
801 | #endregion | 806 | #endregion |
802 | } | 807 | } |
803 | } | 808 | } |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 50d3cc7..68885e1 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -795,5 +795,41 @@ namespace OpenSim.Data.MySQL | |||
795 | deleteOneFolder(folderID); | 795 | deleteOneFolder(folderID); |
796 | deleteItemsInFolder(folderID); | 796 | deleteItemsInFolder(folderID); |
797 | } | 797 | } |
798 | |||
799 | public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) | ||
800 | { | ||
801 | MySqlDataReader result = null; | ||
802 | MySqlCommand sqlCmd = null; | ||
803 | lock (database) | ||
804 | { | ||
805 | try | ||
806 | { | ||
807 | database.CheckConnection(); | ||
808 | sqlCmd = new MySqlCommand( | ||
809 | "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", | ||
810 | database.Connection); | ||
811 | sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString()); | ||
812 | sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); | ||
813 | result = sqlCmd.ExecuteReader(); | ||
814 | |||
815 | List<InventoryItemBase> list = new List<InventoryItemBase>(); | ||
816 | while (result.Read()) | ||
817 | list.Add(readInventoryItem(result)); | ||
818 | |||
819 | return list; | ||
820 | } | ||
821 | catch (Exception e) | ||
822 | { | ||
823 | database.Reconnect(); | ||
824 | m_log.Error(e.ToString()); | ||
825 | return null; | ||
826 | } | ||
827 | finally | ||
828 | { | ||
829 | if(result != null) result.Close(); | ||
830 | if(sqlCmd != null) sqlCmd.Dispose(); | ||
831 | } | ||
832 | } | ||
833 | } | ||
798 | } | 834 | } |
799 | } | 835 | } |
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 20dad1a..bceb5d5 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -389,5 +389,10 @@ namespace OpenSim.Data.NHibernate | |||
389 | 389 | ||
390 | return folders; | 390 | return folders; |
391 | } | 391 | } |
392 | |||
393 | public List<InventoryItemBase> fetchActiveGestures (UUID avatarID) | ||
394 | { | ||
395 | return null; | ||
396 | } | ||
392 | } | 397 | } |
393 | } | 398 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 40b61ee..b9fda04 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -847,5 +847,24 @@ namespace OpenSim.Data.SQLite | |||
847 | row["UUID"] = Util.ToRawUuidString(folder.ID); | 847 | row["UUID"] = Util.ToRawUuidString(folder.ID); |
848 | row["parentID"] = Util.ToRawUuidString(folder.ParentID); | 848 | row["parentID"] = Util.ToRawUuidString(folder.ParentID); |
849 | } | 849 | } |
850 | |||
851 | public List<InventoryItemBase> fetchActiveGestures (UUID avatarID) | ||
852 | { | ||
853 | lock (ds) | ||
854 | { | ||
855 | List<InventoryItemBase> items = new List<InventoryItemBase>(); | ||
856 | |||
857 | DataTable inventoryItemTable = ds.Tables["inventoryitems"]; | ||
858 | string selectExp = "avatarID = '" + Util.ToRawUuidString(avatarID) + "' AND assetType = " + | ||
859 | (int)AssetType.Gesture + " AND flags = 1"; | ||
860 | m_log.DebugFormat("[SQL]: sql = " + selectExp); | ||
861 | DataRow[] rows = inventoryItemTable.Select(selectExp); | ||
862 | foreach (DataRow row in rows) | ||
863 | { | ||
864 | items.Add(buildItem(row)); | ||
865 | } | ||
866 | return items; | ||
867 | } | ||
868 | } | ||
850 | } | 869 | } |
851 | } | 870 | } |