Index: Framework/FriendListItem.cs =================================================================== --- Framework/FriendListItem.cs (revision 3417) +++ Framework/FriendListItem.cs (working copy) @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using libsecondlife; +using OpenSim.Framework; namespace OpenSim.Framework { @@ -42,9 +43,47 @@ public uint FriendPerms; // These are what the friend gives the listowner permission to do + // not column in DB but denormailsation of reverse permissions + // on add this and Friend Pers are same, but will change over time. + public uint FriendListOwnerPerms; + // added by jonc - obj as well as DB should know about this IMHO - and helps Hibernate mapping :) + public uint CreateDate = (uint)Util.UnixTimeSinceEpoch(); + public bool onlinestatus = false; + + + /// + /// Added by jonc as Hibernate needs objs with composite keys to be comparable + /// + /// + /// + + public override bool Equals(object obj) + { + FriendListItem other = (FriendListItem)obj; + if (other == null) + { + return false; + } + else + { + return FriendListOwner.Equals( other.FriendListOwner) && Friend.Equals( other.Friend ); + } + } + + /// + /// Added by jonc as Hibernate needs objs with composite keys to be comparable + /// + /// + /// + + public override int GetHashCode() + { + return 37 * Friend.GetHashCode() + FriendListOwner.GetHashCode(); + } + }