Files
SingularityViewer/indra/newview/rlvviewer2.h
2012-01-25 21:11:33 +01:00

64 lines
1.9 KiB
C++

/**
* $LicenseInfo:firstyear=2004&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 RLV_VIEWER2_H
#define RLV_VIEWER2_H
#include "llcallbacklist.h"
#include "llinventoryobserver.h"
#include "boost/function.hpp"
// ============================================================================
// From lloutfitobserver.h
class LLCOFObserver : public LLInventoryObserver, public LLSingleton<LLCOFObserver>
{
friend class LLSingleton<LLCOFObserver>;
protected:
LLCOFObserver();
public:
virtual ~LLCOFObserver();
virtual void changed(U32 mask);
typedef boost::signals2::signal<void (void)> signal_t;
void addCOFChangedCallback(const signal_t::slot_type& cb) { mCOFChanged.connect(cb); }
void addCOFSavedCallback(const signal_t::slot_type& cb) { mCOFSaved.connect(cb); }
protected:
bool checkCOF();
static S32 getCategoryVersion(const LLUUID& cat_id);
static const std::string& getCategoryName(const LLUUID& cat_id);
static LLMD5 hashDirectDescendentNames(const LLUUID& cat_id);
private:
signal_t mCOFChanged;
signal_t mCOFSaved;
S32 mCOFLastVersion;
LLMD5 mItemNameHash;
};
#endif // RLV_VIEWER2_H