opensim-development – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 eva 1 /*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27  
28 using System;
29 using System.Collections.Generic;
30 using OpenMetaverse;
31 using OpenSim.Framework;
32  
33 namespace OpenSim.Data
34 {
35 public class XInventoryFolder
36 {
37 public string folderName;
38 public int type;
39 public int version;
40 public UUID folderID;
41 public UUID agentID;
42 public UUID parentFolderID;
43  
44 public XInventoryFolder Clone()
45 {
46 return (XInventoryFolder)MemberwiseClone();
47 }
48 }
49  
50 public class XInventoryItem
51 {
52 public UUID assetID;
53 public int assetType;
54 public string inventoryName;
55 public string inventoryDescription;
56 public int inventoryNextPermissions;
57 public int inventoryCurrentPermissions;
58 public int invType;
59 public string creatorID;
60 public int inventoryBasePermissions;
61 public int inventoryEveryOnePermissions;
62 public int salePrice;
63 public int saleType;
64 public int creationDate;
65 public UUID groupID;
66 public int groupOwned;
67 public int flags;
68 public UUID inventoryID;
69 public UUID avatarID;
70 public UUID parentFolderID;
71 public int inventoryGroupPermissions;
72  
73 public XInventoryItem Clone()
74 {
75 return (XInventoryItem)MemberwiseClone();
76 }
77 }
78  
79 public interface IXInventoryData
80 {
81 XInventoryFolder[] GetFolders(string[] fields, string[] vals);
82 XInventoryItem[] GetItems(string[] fields, string[] vals);
83  
84 bool StoreFolder(XInventoryFolder folder);
85 bool StoreItem(XInventoryItem item);
86  
87 /// <summary>
88 /// Delete folders where field == val
89 /// </summary>
90 /// <param name="field"></param>
91 /// <param name="val"></param>
92 /// <returns>true if the delete was successful, false if it was not</returns>
93 bool DeleteFolders(string field, string val);
94  
95 /// <summary>
96 /// Delete folders where field1 == val1, field2 == val2...
97 /// </summary>
98 /// <param name="fields"></param>
99 /// <param name="vals"></param>
100 /// <returns>true if the delete was successful, false if it was not</returns>
101 bool DeleteFolders(string[] fields, string[] vals);
102  
103 /// <summary>
104 /// Delete items where field == val
105 /// </summary>
106 /// <param name="field"></param>
107 /// <param name="val"></param>
108 /// <returns>true if the delete was successful, false if it was not</returns>
109 bool DeleteItems(string field, string val);
110  
111 /// <summary>
112 /// Delete items where field1 == val1, field2 == val2...
113 /// </summary>
114 /// <param name="fields"></param>
115 /// <param name="vals"></param>
116 /// <returns>true if the delete was successful, false if it was not</returns>
117 bool DeleteItems(string[] fields, string[] vals);
118  
119 /// <summary>
120 /// Move an item to another folder.
121 /// </summary>
122 /// <returns>/returns>
123 /// <param name='id'>UUID of the item</param>
124 /// <param name='newParent'>UUID of the new parent folder.</param>
125 bool MoveItem(string id, string newParentFolderID);
126  
127 /// <summary>
128 /// Move a folder to another folder.
129 /// </summary>
130 /// <returns>/returns>
131 /// <param name='id'>UUID of the item</param>
132 /// <param name='newParent'>UUID of the new parent folder.</param>
133 bool MoveFolder(string id, string newParentFolderID);
134  
135 XInventoryItem[] GetActiveGestures(UUID principalID);
136 int GetAssetPermissions(UUID principalID, UUID assetID);
137 }
138 }