aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-02-11 19:29:59 +0000
committerJustin Clarke Casey2009-02-11 19:29:59 +0000
commite12981ef1be8a424a975f8976d43245de868efb9 (patch)
tree26a78b17264907feff777dd4360758fce92860c7 /OpenSim/Framework
parent* Refactor inventory archive code to allow direct invocation in order to supp... (diff)
downloadopensim-SC-e12981ef1be8a424a975f8976d43245de868efb9.zip
opensim-SC-e12981ef1be8a424a975f8976d43245de868efb9.tar.gz
opensim-SC-e12981ef1be8a424a975f8976d43245de868efb9.tar.bz2
opensim-SC-e12981ef1be8a424a975f8976d43245de868efb9.tar.xz
* Establish a common InventoryNodeBase class from InventoryItemBase and InventoryFolderBase
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/InventoryFolderBase.cs35
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs34
-rw-r--r--OpenSim/Framework/InventoryNodeBase.cs67
3 files changed, 70 insertions, 66 deletions
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs
index e55f834..a6e249e 100644
--- a/OpenSim/Framework/InventoryFolderBase.cs
+++ b/OpenSim/Framework/InventoryFolderBase.cs
@@ -32,24 +32,9 @@ namespace OpenSim.Framework
32 /// <summary> 32 /// <summary>
33 /// A Class for folders which contain users inventory 33 /// A Class for folders which contain users inventory
34 /// </summary> 34 /// </summary>
35 public class InventoryFolderBase 35 public class InventoryFolderBase : InventoryNodeBase
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// The UUID for this folder
39 /// </summary>
40 private UUID _id;
41
42 /// <summary>
43 /// The name of the folder (64 characters or less)
44 /// </summary>
45 private string _name;
46
47 /// <summary>
48 /// The agent who's inventory this is contained by
49 /// </summary>
50 private UUID _owner;
51
52 /// <summary>
53 /// The folder this folder is contained in 38 /// The folder this folder is contained in
54 /// </summary> 39 /// </summary>
55 private UUID _parentID; 40 private UUID _parentID;
@@ -66,30 +51,12 @@ namespace OpenSim.Framework
66 /// </summary> 51 /// </summary>
67 private ushort _version; 52 private ushort _version;
68 53
69 public virtual string Name
70 {
71 get { return _name; }
72 set { _name = value; }
73 }
74
75 public virtual UUID Owner
76 {
77 get { return _owner; }
78 set { _owner = value; }
79 }
80
81 public virtual UUID ParentID 54 public virtual UUID ParentID
82 { 55 {
83 get { return _parentID; } 56 get { return _parentID; }
84 set { _parentID = value; } 57 set { _parentID = value; }
85 } 58 }
86 59
87 public virtual UUID ID
88 {
89 get { return _id; }
90 set { _id = value; }
91 }
92
93 public virtual short Type 60 public virtual short Type
94 { 61 {
95 get { return _type; } 62 get { return _type; }
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index cd96e01..ecc2d76 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework
33 /// <summary> 33 /// <summary>
34 /// Inventory Item - contains all the properties associated with an individual inventory piece. 34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase 36 public class InventoryItemBase : InventoryNodeBase
37 { 37 {
38 /// <summary> 38 /// <summary>
39 /// The UUID of the associated asset on the asset server 39 /// The UUID of the associated asset on the asset server
@@ -55,8 +55,6 @@ namespace OpenSim.Framework
55 /// </summary> 55 /// </summary>
56 private UUID _creator; 56 private UUID _creator;
57 57
58 private UUID _owner;
59
60 private uint _nextPermissions; 58 private uint _nextPermissions;
61 59
62 /// <summary> 60 /// <summary>
@@ -85,22 +83,11 @@ namespace OpenSim.Framework
85 private UUID _folder; 83 private UUID _folder;
86 84
87 /// <summary> 85 /// <summary>
88 /// A UUID containing the ID for the inventory item itself 86 /// The inventory type of the item. This is slightly different from the asset type in some situations.
89 /// </summary>
90 private UUID _id;
91
92 /// <summary>
93 /// The type of inventory item. (Can be slightly different to the asset type
94 /// </summary> 87 /// </summary>
95 private int _invType; 88 private int _invType;
96 89
97 /// <summary> 90 /// <summary>
98 /// The name of the inventory item (must be less than 64 characters)
99 /// </summary>
100 private string _name;
101
102
103 /// <summary>
104 /// 91 ///
105 /// </summary> 92 /// </summary>
106 private UUID _groupID; 93 private UUID _groupID;
@@ -130,11 +117,6 @@ namespace OpenSim.Framework
130 /// </summary> 117 /// </summary>
131 private int _creationDate; 118 private int _creationDate;
132 119
133 public UUID ID {
134 get { return _id; }
135 set { _id = value; }
136 }
137
138 public int InvType 120 public int InvType
139 { 121 {
140 get { return _invType; } 122 get { return _invType; }
@@ -147,24 +129,12 @@ namespace OpenSim.Framework
147 set { _folder = value; } 129 set { _folder = value; }
148 } 130 }
149 131
150 public UUID Owner
151 {
152 get { return _owner; }
153 set { _owner = value; }
154 }
155
156 public UUID Creator 132 public UUID Creator
157 { 133 {
158 get { return _creator; } 134 get { return _creator; }
159 set { _creator = value; } 135 set { _creator = value; }
160 } 136 }
161 137
162 public string Name
163 {
164 get { return _name; }
165 set { _name = value; }
166 }
167
168 public string Description 138 public string Description
169 { 139 {
170 get { return _description; } 140 get { return _description; }
diff --git a/OpenSim/Framework/InventoryNodeBase.cs b/OpenSim/Framework/InventoryNodeBase.cs
new file mode 100644
index 0000000..6f61ab5
--- /dev/null
+++ b/OpenSim/Framework/InventoryNodeBase.cs
@@ -0,0 +1,67 @@
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 OpenSim 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
28using OpenMetaverse;
29
30namespace OpenSim.Framework
31{
32 /// <summary>
33 /// Common base class for inventory nodes of different types (files, folders, etc.)
34 /// </summary>
35 public class InventoryNodeBase
36 {
37 /// <summary>
38 /// The name of the node (64 characters or less)
39 /// </summary>
40 public virtual string Name
41 {
42 get { return m_name; }
43 set { m_name = value; }
44 }
45 private string m_name;
46
47 /// <summary>
48 /// A UUID containing the ID for the inventory node itself
49 /// </summary>
50 public UUID ID
51 {
52 get { return m_id; }
53 set { m_id = value; }
54 }
55 private UUID m_id;
56
57 /// <summary>
58 /// The agent who's inventory this is contained by
59 /// </summary>
60 public virtual UUID Owner
61 {
62 get { return m_owner; }
63 set { m_owner = value; }
64 }
65 private UUID m_owner;
66 }
67}