aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
authorDiva Canto2010-02-25 17:42:51 -0800
committerDiva Canto2010-02-25 17:42:51 -0800
commitc745df007d1730e59fbdb4ebf8440654d1675ade (patch)
treeca3e63d93add73a870901956301bc243b8428a69 /OpenSim/Services/Interfaces
parentMerge branch 'presence-refactor' of melanie@opensimulator.org:/var/git/opensi... (diff)
downloadopensim-SC_OLD-c745df007d1730e59fbdb4ebf8440654d1675ade.zip
opensim-SC_OLD-c745df007d1730e59fbdb4ebf8440654d1675ade.tar.gz
opensim-SC_OLD-c745df007d1730e59fbdb4ebf8440654d1675ade.tar.bz2
opensim-SC_OLD-c745df007d1730e59fbdb4ebf8440654d1675ade.tar.xz
Added server-side Friends in connector. Untested.
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IFriendsService.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Services/Interfaces/IFriendsService.cs b/OpenSim/Services/Interfaces/IFriendsService.cs
index 811203c..fc20224 100644
--- a/OpenSim/Services/Interfaces/IFriendsService.cs
+++ b/OpenSim/Services/Interfaces/IFriendsService.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using OpenMetaverse; 29using OpenMetaverse;
29using OpenSim.Framework; 30using OpenSim.Framework;
30using System.Collections.Generic; 31using System.Collections.Generic;
@@ -37,6 +38,33 @@ namespace OpenSim.Services.Interfaces
37 public string Friend; 38 public string Friend;
38 public int MyFlags; 39 public int MyFlags;
39 public int TheirFlags; 40 public int TheirFlags;
41
42 public FriendInfo(Dictionary<string, object> kvp)
43 {
44 PrincipalID = UUID.Zero;
45 if (kvp.ContainsKey("PrincipalID") && kvp["PrincipalID"] != null)
46 UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID);
47 Friend = string.Empty;
48 if (kvp.ContainsKey("Friend") && kvp["Friend"] != null)
49 Friend = kvp["Friend"].ToString();
50 MyFlags = 0;
51 if (kvp.ContainsKey("MyFlags") && kvp["MyFlags"] != null)
52 Int32.TryParse(kvp["MyFlags"].ToString(), out MyFlags);
53 TheirFlags = 0;
54 if (kvp.ContainsKey("TheirFlags") && kvp["TheirFlags"] != null)
55 Int32.TryParse(kvp["TheirFlags"].ToString(), out TheirFlags);
56 }
57
58 public Dictionary<string, object> ToKeyValuePairs()
59 {
60 Dictionary<string, object> result = new Dictionary<string, object>();
61 result["PricipalID"] = PrincipalID.ToString();
62 result["Friend"] = Friend;
63 result["MyFlags"] = MyFlags.ToString();
64 result["TheirFlags"] = TheirFlags.ToString();
65
66 return result;
67 }
40 } 68 }
41 69
42 public interface IFriendsService 70 public interface IFriendsService