Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experience Tools #81

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions OpenSim.sln
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Region.OptionalModu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSim.Server.MoneyServer", "addon-modules\OpenSim.Server.MoneyServer\OpenSim.Server.MoneyServer\OpenSim.Server.MoneyServer.csproj", "{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Services.ExperienceService", "OpenSim\Services\ExperienceService\OpenSim.Services.ExperienceService.csproj", "{186509B6-EF90-431A-9034-75A1221E4120}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -441,6 +443,10 @@ Global
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3AEE6AC-BE40-4003-A7A3-E8AA039E4451}.Release|Any CPU.Build.0 = Release|Any CPU
{186509B6-EF90-431A-9034-75A1221E4120}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{186509B6-EF90-431A-9034-75A1221E4120}.Debug|Any CPU.Build.0 = Debug|Any CPU
{186509B6-EF90-431A-9034-75A1221E4120}.Release|Any CPU.ActiveCfg = Release|Any CPU
{186509B6-EF90-431A-9034-75A1221E4120}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
5 changes: 5 additions & 0 deletions OpenSim/Capabilities/LLSDTaskInventoryUploadComplete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,10 @@ public class LLSDTaskInventoryUploadComplete
/// State of the upload. So far have only even seen this set to "complete"
/// </summary>
public string state;

/// <summary>
/// What experience key should be used with this script
/// </summary>
public UUID experience = UUID.Zero;
}
}
31 changes: 31 additions & 0 deletions OpenSim/Data/IExperienceData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;

namespace OpenSim.Data
{
public interface IExperienceData
{
Dictionary<UUID, bool> GetExperiencePermissions(UUID agent_id);
bool ForgetExperiencePermissions(UUID agent_id, UUID experience_id);
bool SetExperiencePermissions(UUID agent_id, UUID experience_id, bool allow);

ExperienceInfoData[] GetExperienceInfos(UUID[] experiences);
ExperienceInfoData[] FindExperiences(string search);

UUID[] GetAgentExperiences(UUID agent_id);
UUID[] GetGroupExperiences(UUID agent_id);
UUID[] GetExperiencesForGroups(UUID[] groups);

bool UpdateExperienceInfo(ExperienceInfoData data);

// KeyValue
string GetKeyValue(UUID experience, string key);
bool SetKeyValue(UUID experience, string key, string val);
bool DeleteKey(UUID experience, string key);
int GetKeyCount(UUID experience);
string[] GetKeys(UUID experience, int start, int count);
int GetKeyValueSize(UUID experience);
}
}
6 changes: 6 additions & 0 deletions OpenSim/Data/MySQL/MySQLEstateData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public EstateSettings CreateNewEstate(int estateID)
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
es.AllowedExperiences = LoadUUIDList(es.EstateID, "estate_allowed_experiences");
es.KeyExperiences = LoadUUIDList(es.EstateID, "estate_key_experiences");

return es;
}
Expand Down Expand Up @@ -184,6 +186,8 @@ private EstateSettings DoLoad(MySqlCommand cmd, UUID regionID, bool create)
es.EstateManagers = LoadUUIDList(es.EstateID, "estate_managers");
es.EstateAccess = LoadUUIDList(es.EstateID, "estate_users");
es.EstateGroups = LoadUUIDList(es.EstateID, "estate_groups");
es.AllowedExperiences = LoadUUIDList(es.EstateID, "estate_allowed_experiences");
es.KeyExperiences = LoadUUIDList(es.EstateID, "estate_key_experiences");
return es;
}

Expand Down Expand Up @@ -278,6 +282,8 @@ public void StoreEstateSettings(EstateSettings es)
SaveUUIDList(es.EstateID, "estate_managers", es.EstateManagers);
SaveUUIDList(es.EstateID, "estate_users", es.EstateAccess);
SaveUUIDList(es.EstateID, "estate_groups", es.EstateGroups);
SaveUUIDList(es.EstateID, "estate_allowed_experiences", es.AllowedExperiences);
SaveUUIDList(es.EstateID, "estate_key_experiences", es.KeyExperiences);
}

private void LoadBanList(EstateSettings es)
Expand Down
Loading
Loading