28 using System.Collections.Generic;
30 using OpenSim.Framework;
33 namespace OpenSim.Services.Interfaces
37 List<GridInstantMessage> GetMessages(UUID principalID);
45 void DeleteMessages(UUID userID);
54 if (dict.ContainsKey(
"BinaryBucket") && dict[
"BinaryBucket"] != null)
55 im.
binaryBucket = OpenMetaverse.Utils.HexStringToBytes(dict[
"BinaryBucket"].ToString(),
true);
57 if (dict.ContainsKey(
"Dialog") && dict[
"Dialog"] != null)
58 im.
dialog = byte.Parse(dict[
"Dialog"].ToString());
60 if (dict.ContainsKey(
"FromAgentID") && dict[
"FromAgentID"] != null)
61 im.
fromAgentID =
new Guid(dict[
"FromAgentID"].ToString());
63 if (dict.ContainsKey(
"FromAgentName") && dict[
"FromAgentName"] != null)
66 im.fromAgentName = string.Empty;
68 if (dict.ContainsKey(
"FromGroup") && dict[
"FromGroup"] != null)
69 im.
fromGroup =
bool.Parse(dict[
"FromGroup"].ToString());
71 if (dict.ContainsKey(
"SessionID") && dict[
"SessionID"] != null)
72 im.
imSessionID =
new Guid(dict[
"SessionID"].ToString());
74 if (dict.ContainsKey(
"Message") && dict[
"Message"] != null)
75 im.
message = dict[
"Message"].ToString();
77 im.message = string.Empty;
79 if (dict.ContainsKey(
"Offline") && dict[
"Offline"] != null)
80 im.
offline = byte.Parse(dict[
"Offline"].ToString());
82 if (dict.ContainsKey(
"EstateID") && dict[
"EstateID"] != null)
85 if (dict.ContainsKey(
"Position") && dict[
"Position"] != null)
86 im.
Position = Vector3.Parse(dict[
"Position"].ToString());
88 if (dict.ContainsKey(
"RegionID") && dict[
"RegionID"] != null)
89 im.
RegionID =
new Guid(dict[
"RegionID"].ToString());
91 if (dict.ContainsKey(
"Timestamp") && dict[
"Timestamp"] != null)
92 im.
timestamp = UInt32.Parse(dict[
"Timestamp"].ToString());
94 if (dict.ContainsKey(
"ToAgentID") && dict[
"ToAgentID"] != null)
95 im.
toAgentID =
new Guid(dict[
"ToAgentID"].ToString());
102 Dictionary<string, object> dict =
new Dictionary<string, object>();
104 dict[
"BinaryBucket"] = OpenMetaverse.Utils.BytesToHexString(im.binaryBucket, im.binaryBucket.Length, null);
105 dict[
"Dialog"] = im.dialog.ToString();
106 dict[
"FromAgentID"] = im.fromAgentID.ToString();
107 dict[
"FromAgentName"] = im.fromAgentName == null ? string.Empty : im.fromAgentName;
108 dict[
"FromGroup"] = im.fromGroup.ToString();
109 dict[
"SessionID"] = im.imSessionID.ToString();
110 dict[
"Message"] = im.message == null ? string.Empty : im.message;
111 dict[
"Offline"] = im.offline.ToString();
112 dict[
"EstateID"] = im.ParentEstateID.ToString();
113 dict[
"Position"] = im.Position.ToString();
114 dict[
"RegionID"] = im.RegionID.ToString();
115 dict[
"Timestamp"] = im.timestamp.ToString();
116 dict[
"ToAgentID"] = im.toAgentID.ToString();
static GridInstantMessage GridInstantMessage(Dictionary< string, object > dict)
static Dictionary< string, object > GridInstantMessage(GridInstantMessage im)