From f094847c43821cf4922f8e2156cacb7f6078c379 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 5 Apr 2009 01:28:23 +0000 Subject: * Implements ISocialEntity - this represents the class of "user-like" objects such as Users, Groups, etc. Destined to be used as the return value of any "Owner" properties. * Implements basic "SEUser" class which implements Avatar/Agent SE functions (primitive). --- .../Scripting/Minimodule/IPersistence.cs | 1 - .../Scripting/Minimodule/ISocialEntity.cs | 14 +++++++++ .../OptionalModules/Scripting/Minimodule/SEUser.cs | 34 ++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs create mode 100644 OpenSim/Region/OptionalModules/Scripting/Minimodule/SEUser.cs (limited to 'OpenSim/Region/OptionalModules/Scripting') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IPersistence.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IPersistence.cs index 5ca4f59..e433c11 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IPersistence.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IPersistence.cs @@ -6,7 +6,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { interface IPersistence { - T Get(Guid storageID); T Get(); diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs new file mode 100644 index 0000000..fe4826a --- /dev/null +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ISocialEntity.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; + +namespace OpenSim.Region.OptionalModules.Scripting.Minimodule +{ + interface ISocialEntity + { + UUID GlobalID { get; } + string Name { get; } + bool IsUser { get; } + } +} \ No newline at end of file diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SEUser.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SEUser.cs new file mode 100644 index 0000000..1fc1c55 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SEUser.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; + +namespace OpenSim.Region.OptionalModules.Scripting.Minimodule +{ + class SEUser : ISocialEntity + { + private readonly UUID m_uuid; + private readonly string m_name; + + public SIUser(UUID uuid, string name) + { + this.m_uuid = uuid; + this.m_name = name; + } + + public UUID GlobalID + { + get { return m_uuid; } + } + + public string Name + { + get { return m_name; } + } + + public bool IsUser + { + get { return true; } + } + } +} -- cgit v1.1