Add persistence of active gestures. This needs an UGAIM update to work.

Active gestures are sent as part of the login-response. Added
fetchActiveGestures to SQLite and MySQL; added an empty one for MSSQL and
NHibernate. Using the empty ones won't cause errors, but doesn't provide
persistence either, of course.
This commit is contained in:
Homer Horwitz
2008-09-24 21:12:21 +00:00
parent cffb975dd9
commit fe9aea258f
13 changed files with 198 additions and 4 deletions

View File

@@ -142,6 +142,9 @@ namespace OpenSim.Region.Communications.Local
/// <param name="startLocationRequest">The requested start location</param>
public override bool CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest)
{
// add active gestures to login-response
AddActiveGestures(response, theUser);
// HomeLocation
RegionInfo homeInfo = null;
@@ -254,6 +257,33 @@ namespace OpenSim.Region.Communications.Local
return PrepareLoginToRegion(regionInfo, theUser, response);
}
/// <summary>
/// Add active gestures of the user to the login response.
/// </summary>
/// <param name="response">
/// A <see cref="LoginResponse"/>
/// </param>
/// <param name="theUser">
/// A <see cref="UserProfileData"/>
/// </param>
private void AddActiveGestures(LoginResponse response, UserProfileData theUser)
{
List<InventoryItemBase> gestures = m_interServiceInventoryService.GetActiveGestures(theUser.ID);
m_log.DebugFormat("[LOGIN]: AddActiveGestures, found {0}", gestures == null ? 0 : gestures.Count);
ArrayList list = new ArrayList();
if (gestures != null)
{
foreach (InventoryItemBase gesture in gestures)
{
Hashtable item = new Hashtable();
item["item_id"] = gesture.ID.ToString();
item["asset_id"] = gesture.AssetID.ToString();
list.Add(item);
}
}
response.ActiveGestures = list;
}
/// <summary>
/// Prepare a login to the given region. This involves both telling the region to expect a connection
/// and appropriately customising the response to the user.