Presence Step 1
parent
88b3b98811
commit
982e3ff5d9
|
@ -32,10 +32,11 @@ using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Data
|
namespace OpenSim.Data
|
||||||
{
|
{
|
||||||
public struct PresenceData
|
// This MUST be a ref type!
|
||||||
|
public class PresenceData
|
||||||
{
|
{
|
||||||
public UUID UUID;
|
public UUID PrincipalID;
|
||||||
public UUID currentRegion;
|
public UUID RegionID;
|
||||||
public Dictionary<string, string> Data;
|
public Dictionary<string, string> Data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +49,6 @@ namespace OpenSim.Data
|
||||||
|
|
||||||
PresenceData Get(UUID principalID);
|
PresenceData Get(UUID principalID);
|
||||||
|
|
||||||
bool SetUserDataItem(UUID principalID, string item, string value);
|
|
||||||
bool SetRegionDataItem(UUID principalID, string item, string value);
|
|
||||||
|
|
||||||
bool Delete(UUID regionID);
|
bool Delete(UUID regionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,6 @@ namespace OpenSim.Server.Handlers.Presence
|
||||||
byte[] Report(Dictionary<string, string> request)
|
byte[] Report(Dictionary<string, string> request)
|
||||||
{
|
{
|
||||||
PresenceInfo info = new PresenceInfo();
|
PresenceInfo info = new PresenceInfo();
|
||||||
info.Data = new Dictionary<string, string>();
|
|
||||||
|
|
||||||
if (request["PrincipalID"] == null || request["RegionID"] == null)
|
if (request["PrincipalID"] == null || request["RegionID"] == null)
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
@ -108,15 +107,6 @@ namespace OpenSim.Server.Handlers.Presence
|
||||||
out info.RegionID))
|
out info.RegionID))
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
||||||
foreach (KeyValuePair<string, string> kvp in request)
|
|
||||||
{
|
|
||||||
if (kvp.Key == "METHOD" ||
|
|
||||||
kvp.Key == "PrincipalID" ||
|
|
||||||
kvp.Key == "RegionID")
|
|
||||||
continue;
|
|
||||||
|
|
||||||
info.Data[kvp.Key] = kvp.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_PresenceService.Report(info))
|
if (m_PresenceService.Report(info))
|
||||||
return SuccessResult();
|
return SuccessResult();
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
@ -35,7 +36,13 @@ namespace OpenSim.Services.Interfaces
|
||||||
{
|
{
|
||||||
public UUID PrincipalID;
|
public UUID PrincipalID;
|
||||||
public UUID RegionID;
|
public UUID RegionID;
|
||||||
public Dictionary<string, string> Data;
|
public UUID SessionID;
|
||||||
|
public UUID SecureSessionID;
|
||||||
|
public bool Online;
|
||||||
|
public DateTime Login;
|
||||||
|
public DateTime Logout;
|
||||||
|
public Vector3 Position;
|
||||||
|
public Vector3 LookAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IPresenceService
|
public interface IPresenceService
|
||||||
|
|
|
@ -55,11 +55,8 @@ namespace OpenSim.Services.PresenceService
|
||||||
PresenceData p = new PresenceData();
|
PresenceData p = new PresenceData();
|
||||||
p.Data = new Dictionary<string, string>();
|
p.Data = new Dictionary<string, string>();
|
||||||
|
|
||||||
p.UUID = presence.PrincipalID;
|
p.PrincipalID = presence.PrincipalID;
|
||||||
p.currentRegion = presence.RegionID;
|
p.RegionID = presence.RegionID;
|
||||||
|
|
||||||
foreach (KeyValuePair<string, string> kvp in presence.Data)
|
|
||||||
p.Data[kvp.Key] = kvp.Value;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue