Adds finding and using libjsoncpp. Note that the old cmake file found libjson, not the same thing. Adds Debug Setting WebProfileNonProductionURL (next to already existing WebProfileURL) to mimic V3's behavior and use a different URL for aditi. These Debug Settings are using by (the new) getProfileURL() (copied from V3 with just a minor fix). Adds HippoGridInfo::isInProductionGrid() next to the existing LLViewerLogin::isInProductionGrid that always returned true. The former should only be called SL grids and then only returns true for agni (and false for aditi et al). The latter was changed to now always return true except on SL when the grid isn't agni. The first is used for SL-only cases, the latter for things like colors and for godmode decision logic. V3's llwebprofile.cpp was fixed to compile on singu, with only real difference that I dropped the Content-Type headers for the GET methods.
107 lines
2.6 KiB
C++
107 lines
2.6 KiB
C++
/**
|
|
* @file llpanelprofile.h
|
|
* @brief Profile panel
|
|
*
|
|
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
|
* Second Life Viewer Source Code
|
|
* Copyright (C) 2010, Linden Research, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation;
|
|
* version 2.1 of the License only.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
|
* $/LicenseInfo$
|
|
*/
|
|
|
|
#ifndef LL_LLPANELPROFILE_H
|
|
#define LL_LLPANELPROFILE_H
|
|
|
|
#ifdef AI_UNUSED
|
|
#include "llpanel.h"
|
|
#include "llpanelavatar.h"
|
|
|
|
class LLTabContainer;
|
|
#endif // AI_UNUSED
|
|
|
|
std::string getProfileURL(const std::string& agent_name);
|
|
|
|
#ifdef AI_UNUSED
|
|
/**
|
|
* Base class for Profile View and My Profile.
|
|
*/
|
|
class LLPanelProfile : public LLPanel
|
|
{
|
|
LOG_CLASS(LLPanelProfile);
|
|
|
|
public:
|
|
/*virtual*/ BOOL postBuild();
|
|
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
|
/*virtual*/ void onOpen(const LLSD& key);
|
|
|
|
virtual void openPanel(LLPanel* panel, const LLSD& params);
|
|
|
|
virtual void closePanel(LLPanel* panel);
|
|
|
|
S32 notifyParent(const LLSD& info);
|
|
|
|
protected:
|
|
|
|
LLPanelProfile();
|
|
|
|
virtual void onTabSelected(const LLSD& param);
|
|
|
|
const LLUUID& getAvatarId() { return mAvatarId; }
|
|
|
|
void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
|
|
|
|
typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
|
|
|
|
profile_tabs_t& getTabContainer() { return mTabContainer; }
|
|
|
|
private:
|
|
|
|
//-- ChildStack begins ----------------------------------------------------
|
|
class ChildStack
|
|
{
|
|
LOG_CLASS(LLPanelProfile::ChildStack);
|
|
public:
|
|
ChildStack();
|
|
~ChildStack();
|
|
void setParent(LLPanel* parent);
|
|
|
|
bool push();
|
|
bool pop();
|
|
void preParentReshape();
|
|
void postParentReshape();
|
|
|
|
private:
|
|
void dump();
|
|
|
|
typedef LLView::child_list_t view_list_t;
|
|
typedef std::list<view_list_t> stack_t;
|
|
|
|
stack_t mStack;
|
|
stack_t mSavedStack;
|
|
LLPanel* mParent;
|
|
};
|
|
//-- ChildStack ends ------------------------------------------------------
|
|
|
|
profile_tabs_t mTabContainer;
|
|
ChildStack mChildStack;
|
|
LLUUID mAvatarId;
|
|
};
|
|
#endif // AI_UNUSED
|
|
|
|
#endif //LL_LLPANELPROFILE_H
|