Syncy stuffs

This commit is contained in:
Liru Færs
2020-02-11 13:04:05 -05:00
parent 6959b688be
commit e65b513562
5 changed files with 125 additions and 65 deletions

View File

@@ -139,8 +139,8 @@ set(llmessage_HEADER_FILES
lldatapacker.h
lldbstrings.h
lldispatcher.h
llexperiencecache.h
lleventflags.h
llexperiencecache.h
llfiltersd2xmlrpc.h
llfollowcamparams.h
llhost.h

View File

@@ -132,7 +132,7 @@ protected:
///
/// LLUrlEntryHTTP Describes generic http: and https: Urls
///
class LLUrlEntryHTTP : public LLUrlEntryBase
class LLUrlEntryHTTP final : public LLUrlEntryBase
{
public:
LLUrlEntryHTTP();
@@ -144,7 +144,7 @@ public:
///
/// LLUrlEntryHTTPLabel Describes generic http: and https: Urls with custom labels
///
class LLUrlEntryHTTPLabel : public LLUrlEntryBase
class LLUrlEntryHTTPLabel final : public LLUrlEntryBase
{
public:
LLUrlEntryHTTPLabel();
@@ -156,7 +156,7 @@ public:
///
/// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com
///
class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase
class LLUrlEntryHTTPNoProtocol final : public LLUrlEntryBase
{
public:
LLUrlEntryHTTPNoProtocol();
@@ -166,7 +166,7 @@ public:
std::string getTooltip(const std::string &url) const override;
};
class LLUrlEntryInvalidSLURL : public LLUrlEntryBase
class LLUrlEntryInvalidSLURL final : public LLUrlEntryBase
{
public:
LLUrlEntryInvalidSLURL();
@@ -180,7 +180,7 @@ public:
///
/// LLUrlEntrySLURL Describes http://slurl.com/... Urls
///
class LLUrlEntrySLURL : public LLUrlEntryBase
class LLUrlEntrySLURL final : public LLUrlEntryBase
{
public:
LLUrlEntrySLURL();
@@ -205,7 +205,7 @@ public:
///
/// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls
///
class LLUrlEntrySimpleSecondlifeURL : public LLUrlEntrySecondlifeURL
class LLUrlEntrySimpleSecondlifeURL final : public LLUrlEntrySecondlifeURL
{
public:
LLUrlEntrySimpleSecondlifeURL();
@@ -281,7 +281,7 @@ private:
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/completename
/// that displays the full display name + user name for an avatar
/// such as "James Linden (james.linden)"
class LLUrlEntryAgentCompleteName : public LLUrlEntryAgentName
class LLUrlEntryAgentCompleteName final : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentCompleteName();
@@ -289,7 +289,7 @@ private:
/*virtual*/ std::string getName(const LLAvatarName& avatar_name) override;
};
class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName
class LLUrlEntryAgentLegacyName final : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentLegacyName();
@@ -302,7 +302,7 @@ private:
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname
/// that displays the just the display name for an avatar
/// such as "James Linden"
class LLUrlEntryAgentDisplayName : public LLUrlEntryAgentName
class LLUrlEntryAgentDisplayName final : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentDisplayName();
@@ -315,7 +315,7 @@ private:
/// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/username
/// that displays the just the display name for an avatar
/// such as "james.linden"
class LLUrlEntryAgentUserName : public LLUrlEntryAgentName
class LLUrlEntryAgentUserName final : public LLUrlEntryAgentName
{
public:
LLUrlEntryAgentUserName();
@@ -326,12 +326,12 @@ private:
///
/// LLUrlEntryExperienceProfile Describes a Second Life experience profile Url, e.g.,
/// secondlife:///app/experience/0e346d8b-4433-4d66-a6b0-fd37083abc4c/profile
/// that displays the experience namethat displays the experience name
class LLUrlEntryExperienceProfile : public LLUrlEntryBase
/// that displays the experience name
class LLUrlEntryExperienceProfile final : public LLUrlEntryBase
{
public:
LLUrlEntryExperienceProfile();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override;
private:
void onExperienceDetails(const LLSD& experience_details);
};
@@ -341,7 +341,7 @@ private:
/// LLUrlEntryGroup Describes a Second Life group Url, e.g.,
/// secondlife:///app/group/00005ff3-4044-c79f-9de8-fb28ae0df991/about
///
class LLUrlEntryGroup : public LLUrlEntryBase
class LLUrlEntryGroup final : public LLUrlEntryBase
{
public:
LLUrlEntryGroup();
@@ -356,7 +356,7 @@ private:
/// LLUrlEntryInventory Describes a Second Life inventory Url, e.g.,
/// secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select
///
class LLUrlEntryInventory : public LLUrlEntryBase
class LLUrlEntryInventory final : public LLUrlEntryBase
{
public:
LLUrlEntryInventory();
@@ -368,7 +368,7 @@ private:
/// LLUrlEntryObjectIM Describes a Second Life inspector for the object Url, e.g.,
/// secondlife:///app/objectim/7bcd7864-da6b-e43f-4486-91d28a28d95b?name=Object&owner=3de548e1-57be-cfea-2b78-83ae3ad95998&slurl=Danger!%20Danger!/200/200/30/&groupowned=1
///
class LLUrlEntryObjectIM : public LLUrlEntryBase
class LLUrlEntryObjectIM final : public LLUrlEntryBase
{
public:
LLUrlEntryObjectIM();
@@ -381,7 +381,7 @@ private:
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about
///
class LLUrlEntryParcel : public LLUrlEntryBase
class LLUrlEntryParcel final : public LLUrlEntryBase
{
public:
struct LLParcelData
@@ -428,7 +428,7 @@ private:
/// LLUrlEntryPlace Describes a Second Life location Url, e.g.,
/// secondlife://Ahern/50/50/50
///
class LLUrlEntryPlace : public LLUrlEntryBase
class LLUrlEntryPlace final : public LLUrlEntryBase
{
public:
LLUrlEntryPlace();
@@ -440,7 +440,7 @@ public:
/// LLUrlEntryRegion Describes a Second Life location Url, e.g.,
/// secondlife:///app/region/Ahern/128/128/0
///
class LLUrlEntryRegion : public LLUrlEntryBase
class LLUrlEntryRegion final : public LLUrlEntryBase
{
public:
LLUrlEntryRegion();
@@ -452,7 +452,7 @@ public:
/// LLUrlEntryTeleport Describes a Second Life teleport Url, e.g.,
/// secondlife:///app/teleport/Ahern/50/50/50/
///
class LLUrlEntryTeleport : public LLUrlEntryBase
class LLUrlEntryTeleport final : public LLUrlEntryBase
{
public:
LLUrlEntryTeleport();
@@ -464,7 +464,7 @@ public:
/// LLUrlEntrySL Describes a generic SLURL, e.g., a Url that starts
/// with secondlife:// (used as a catch-all for cases not matched above)
///
class LLUrlEntrySL : public LLUrlEntryBase
class LLUrlEntrySL final : public LLUrlEntryBase
{
public:
LLUrlEntrySL();
@@ -475,7 +475,7 @@ public:
/// LLUrlEntrySLLabel Describes a generic SLURL, e.g., a Url that starts
/// with secondlife:// with the ability to specify a custom label.
///
class LLUrlEntrySLLabel : public LLUrlEntryBase
class LLUrlEntrySLLabel final : public LLUrlEntryBase
{
public:
LLUrlEntrySLLabel();
@@ -489,7 +489,7 @@ public:
/// LLUrlEntryWorldMap Describes a Second Life worldmap Url, e.g.,
/// secondlife:///app/worldmap/Ahern/50/50/50
///
class LLUrlEntryWorldMap : public LLUrlEntryBase
class LLUrlEntryWorldMap final : public LLUrlEntryBase
{
public:
LLUrlEntryWorldMap();
@@ -500,7 +500,7 @@ public:
///
/// LLUrlEntryNoLink lets us turn of URL detection with <nolink>...</nolink> tags
///
class LLUrlEntryNoLink : public LLUrlEntryBase
class LLUrlEntryNoLink final : public LLUrlEntryBase
{
public:
LLUrlEntryNoLink();
@@ -512,7 +512,7 @@ public:
///
/// LLUrlEntryIcon describes an icon with <icon>...</icon> tags
///
class LLUrlEntryIcon : public LLUrlEntryBase
class LLUrlEntryIcon final : public LLUrlEntryBase
{
public:
LLUrlEntryIcon();
@@ -524,7 +524,7 @@ public:
///
/// LLUrlEntryEmail Describes a generic mailto: Urls
///
class LLUrlEntryEmail : public LLUrlEntryBase
class LLUrlEntryEmail final : public LLUrlEntryBase
{
public:
LLUrlEntryEmail();
@@ -536,7 +536,7 @@ public:
///
/// LLUrlEntryJira describes a Jira Issue
///
class LLUrlEntryJira : public LLUrlEntryBase
class LLUrlEntryJira final : public LLUrlEntryBase
{
public:
LLUrlEntryJira();

View File

@@ -1643,6 +1643,8 @@ Changing this setting only affects new text.</string>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
<key>IsCOA</key>
<integer>1</integer>
</map>
<key>ToolbarVisibleFastTimers</key>
<map>

View File

@@ -231,7 +231,7 @@ void LLExperienceLog::eraseExpired()
{
const std::string& date = event_pair.first;
if (isExpired(date))
{
{
expired.push_back(date);
}
});

View File

@@ -102,38 +102,38 @@ const U32 MAX_LISTED_NAMES = 100;
/// Local class declaration
///----------------------------------------------------------------------------
class LLDispatchEstateUpdateInfo : public LLDispatchHandler
class LLDispatchEstateUpdateInfo final : public LLDispatchHandler
{
public:
LLDispatchEstateUpdateInfo() {}
virtual ~LLDispatchEstateUpdateInfo() {}
virtual bool operator()(
bool operator()(
const LLDispatcher* dispatcher,
const std::string& key,
const LLUUID& invoice,
const sparam_t& strings);
const sparam_t& strings) override;
};
class LLDispatchSetEstateAccess : public LLDispatchHandler
class LLDispatchSetEstateAccess final : public LLDispatchHandler
{
public:
LLDispatchSetEstateAccess() {}
virtual ~LLDispatchSetEstateAccess() {}
virtual bool operator()(
bool operator()(
const LLDispatcher* dispatcher,
const std::string& key,
const LLUUID& invoice,
const sparam_t& strings);
const sparam_t& strings) override;
};
class LLDispatchSetEstateExperience : public LLDispatchHandler
class LLDispatchSetEstateExperience final : public LLDispatchHandler
{
public:
virtual bool operator()(
bool operator()(
const LLDispatcher* dispatcher,
const std::string& key,
const LLUUID& invoice,
const sparam_t& strings);
const sparam_t& strings) override;
LLSD getIDs(sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count);
};
@@ -268,6 +268,11 @@ BOOL LLFloaterRegionInfo::postBuild()
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml");
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
if(gDisconnected)
{
return TRUE;
}
if (!gAgent.getRegion()->getCapability("RegionExperiences").empty())
{
panel = new LLPanelRegionExperiences;
@@ -507,7 +512,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
{
LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
if (!floater) return NULL;
if (!floater) return nullptr;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
return panel;
@@ -527,7 +532,7 @@ LLPanelEstateAccess* LLFloaterRegionInfo::getPanelAccess()
LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
{
LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
if (!floater) return NULL;
if (!floater) return nullptr;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant");
return panel;
@@ -540,7 +545,7 @@ LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain()
if (!floater)
{
llassert(floater);
return NULL;
return nullptr;
}
LLTabContainer* tab_container = floater->getChild<LLTabContainer>("region_panels");
@@ -553,13 +558,11 @@ LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain()
LLPanelRegionExperiences* LLFloaterRegionInfo::getPanelExperiences()
{
LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
if (!floater) return NULL;
LLTabContainer* tab_container = floater->getChild<LLTabContainer>("region_panels");
return (LLPanelRegionExperiences*)tab_container->getChild<LLPanel>("Experiences");
if (!floater) return nullptr;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
return (LLPanelRegionExperiences*)tab->getChild<LLPanel>("Experiences");
}
void LLFloaterRegionInfo::onTabSelected(const LLSD& param)
{
LLPanelRegionInfo* active_panel = getChild<LLPanelRegionInfo>(param.asString());
@@ -691,7 +694,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage(
if(strings.empty())
{
msg->nextBlock("ParamList");
msg->addString("Parameter", NULL);
msg->addString("Parameter", nullptr);
}
else
{
@@ -1569,7 +1572,7 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
name.assign("setexperience");
static LLDispatchSetEstateAccess set_experience;
static LLDispatchSetEstateExperience set_experience;
dispatch.addHandler(name, &set_experience);
estate_dispatch_initialized = true;
@@ -1784,13 +1787,13 @@ BOOL LLPanelEstateInfo::postBuild()
{
// set up the callbacks for the generic controls
initCtrl("externally_visible_check");
initCtrl("use_global_time_check");
initCtrl("fixed_sun_check");
initCtrl("sun_hour_slider");
initCtrl("allow_direct_teleport");
initCtrl("limit_payment");
initCtrl("limit_age_verified");
initCtrl("voice_chat_check");
initCtrl("use_global_time_check");
initCtrl("fixed_sun_check");
initCtrl("sun_hour_slider");
initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime");
initHelpBtn("fixed_sun_help", "HelpEstateFixedSun");
initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible");
@@ -2070,7 +2073,7 @@ BOOL LLPanelEstateCovenant::postBuild()
if (mEditor) mEditor->setHandleEditKeysDirectly(TRUE);
LLButton* reset_button = getChild<LLButton>("reset_covenant");
reset_button->setEnabled(gAgent.canManageEstate());
reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, NULL);
reset_button->setClickedCallback(LLPanelEstateCovenant::resetCovenantID, nullptr);
return LLPanelRegionInfo::postBuild();
}
@@ -2151,7 +2154,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio
switch(option)
{
case 0:
self->loadInvItem(NULL);
self->loadInvItem(nullptr);
break;
default:
break;
@@ -2379,11 +2382,11 @@ bool LLDispatchSetEstateAccess::operator()(
if (!panel) return true;
S32 index = 1; // skip estate_id
U32 access_flags = strtoul(strings[index++].c_str(), NULL,10);
S32 num_allowed_agents = strtol(strings[index++].c_str(), NULL, 10);
S32 num_allowed_groups = strtol(strings[index++].c_str(), NULL, 10);
S32 num_banned_agents = strtol(strings[index++].c_str(), NULL, 10);
S32 num_estate_managers = strtol(strings[index++].c_str(), NULL, 10);
U32 access_flags = strtoul(strings[index++].c_str(), nullptr,10);
S32 num_allowed_agents = strtol(strings[index++].c_str(), nullptr, 10);
S32 num_allowed_groups = strtol(strings[index++].c_str(), nullptr, 10);
S32 num_banned_agents = strtol(strings[index++].c_str(), nullptr, 10);
S32 num_estate_managers = strtol(strings[index++].c_str(), nullptr, 10);
// sanity ckecks
if (num_allowed_agents > 0
@@ -2483,13 +2486,63 @@ bool LLDispatchSetEstateAccess::operator()(
return true;
}
LLSD LLDispatchSetEstateExperience::getIDs( sparam_t::const_iterator it, sparam_t::const_iterator end, S32 count )
{
LLSD idList = LLSD::emptyArray();
LLUUID id;
while(count--> 0)
{
memcpy(id.mData, (*(it++)).data(), UUID_BYTES);
idList.append(id);
}
return idList;
}
// key = "setexperience"
// strings[0] = str(estate_id)
// strings[1] = str(send_to_agent_only)
// strings[2] = str(num blocked)
// strings[3] = str(num trusted)
// strings[4] = str(num allowed)
// strings[8] = bin(uuid) ...
// ...
bool LLDispatchSetEstateExperience::operator()(
const LLDispatcher* dispatcher,
const std::string& key,
const LLUUID& invoice,
const sparam_t& strings)
{
LLPanelRegionExperiences* panel = LLFloaterRegionInfo::getPanelExperiences();
if (!panel) return true;
sparam_t::const_iterator it = strings.begin();
++it; // U32 estate_id = strtol((*it).c_str(), NULL, 10);
++it; // U32 send_to_agent_only = strtoul((*(++it)).c_str(), NULL, 10);
LLUUID id;
S32 num_blocked = strtol((*(it++)).c_str(), nullptr, 10);
S32 num_trusted = strtol((*(it++)).c_str(), nullptr, 10);
S32 num_allowed = strtol((*(it++)).c_str(), nullptr, 10);
LLSD ids = LLSD::emptyMap()
.with("blocked", getIDs(it, strings.end(), num_blocked))
.with("trusted", getIDs(it + (num_blocked), strings.end(), num_trusted))
.with("allowed", getIDs(it + (num_blocked+num_trusted), strings.end(), num_allowed));
panel->processResponse(ids);
return true;
}
LLPanelEnvironmentInfo::LLPanelEnvironmentInfo()
: mEnableEditing(false),
mRegionSettingsRadioGroup(NULL),
mDayCycleSettingsRadioGroup(NULL),
mWaterPresetCombo(NULL),
mSkyPresetCombo(NULL),
mDayCyclePresetCombo(NULL)
mRegionSettingsRadioGroup(nullptr),
mDayCycleSettingsRadioGroup(nullptr),
mWaterPresetCombo(nullptr),
mSkyPresetCombo(nullptr),
mDayCyclePresetCombo(nullptr)
{
}
@@ -2512,9 +2565,9 @@ BOOL LLPanelEnvironmentInfo::postBuild()
mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectDayCycle, this));
getChild<LLButton>("apply_btn")->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this));
//getChild<LLButton>("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance()));
getChild<LLButton>("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance()));
getChild<LLButton>("cancel_btn")->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onBtnCancel, this));
//getChild<LLButton>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance()));
getChild<LLButton>("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance()));
LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingschange, this));
LLEnvManagerNew::instance().setRegionSettingsAppliedCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingsApplied, this, _1));
@@ -2560,6 +2613,11 @@ bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region)
void LLPanelEnvironmentInfo::refresh()
{
if(gDisconnected)
{
return;
}
populateWaterPresetsList();
populateSkyPresetsList();
populateDayCyclesList();