Update RLVa to 1.4.0-compatible
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* Copyright (c) 2009-2010, Kitty Barnett
|
||||
* Copyright (c) 2009-2011, Kitty Barnett
|
||||
*
|
||||
* The source code in this file is provided to you under the terms of the
|
||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
||||
@@ -28,30 +28,37 @@
|
||||
// RlvInventory class declaration
|
||||
//
|
||||
|
||||
// TODO-RLVa: [RLVa-1.2.0] Make all of this static rather than a singleton?
|
||||
class RlvInventory : public LLSingleton<RlvInventory>
|
||||
class RlvInventory : public LLSingleton<RlvInventory>, public LLInventoryObserver
|
||||
{
|
||||
protected:
|
||||
RlvInventory() : m_fFetchStarted(false), m_fFetchComplete(false) {}
|
||||
RlvInventory();
|
||||
public:
|
||||
~RlvInventory();
|
||||
|
||||
// LLInventoryObserver override
|
||||
/*virtual*/ void changed(U32 mask);
|
||||
|
||||
/*
|
||||
* #RLV Shared inventory
|
||||
*/
|
||||
public:
|
||||
typedef boost::signals2::signal<void (void)> callback_signal_t;
|
||||
void addSharedRootIDChangedCallback(const callback_signal_t::slot_type& cb) { m_OnSharedRootIDChanged.connect(cb); }
|
||||
// Find all folders that match a supplied criteria (clears the output array)
|
||||
bool findSharedFolders(const std::string& strCriteria, LLInventoryModel::cat_array_t& folders) const;
|
||||
bool findSharedFolders(const std::string& strCriteria, LLInventoryModel::cat_array_t& folders) const;
|
||||
// Gets the shared path for any shared items present in idItems (clears the output array)
|
||||
bool getPath(const uuid_vec_t& idItems, LLInventoryModel::cat_array_t& folders) const;
|
||||
bool getPath(const uuid_vec_t& idItems, LLInventoryModel::cat_array_t& folders) const;
|
||||
// Returns a pointer to the shared root folder (if there is one)
|
||||
LLViewerInventoryCategory* getSharedRoot() const;
|
||||
LLViewerInventoryCategory* getSharedRoot() const;
|
||||
const LLUUID& getSharedRootID() const;
|
||||
// Returns a subfolder of idParent that starts with strFolderName (exact match > partial match)
|
||||
LLViewerInventoryCategory* getSharedFolder(const LLUUID& idParent, const std::string& strFolderName) const;
|
||||
LLViewerInventoryCategory* getSharedFolder(const LLUUID& idParent, const std::string& strFolderName) const;
|
||||
// Looks up a folder from a path (relative to the shared root)
|
||||
LLViewerInventoryCategory* getSharedFolder(const std::string& strPath) const;
|
||||
LLViewerInventoryCategory* getSharedFolder(const std::string& strPath) const;
|
||||
// Returns the path of the supplied folder (relative to the shared root)
|
||||
std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const;
|
||||
std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const;
|
||||
// Returns TRUE if the supplied folder is a descendent of the #RLV folder
|
||||
bool isSharedFolder(const LLUUID& idFolder);
|
||||
bool isSharedFolder(const LLUUID& idFolder);
|
||||
|
||||
/*
|
||||
* Inventory fetching
|
||||
@@ -76,8 +83,10 @@ public:
|
||||
* Member variables
|
||||
*/
|
||||
protected:
|
||||
bool m_fFetchStarted; // TRUE if we fired off an inventory fetch
|
||||
bool m_fFetchComplete; // TRUE if everything was fetched
|
||||
bool m_fFetchStarted; // TRUE if we fired off an inventory fetch
|
||||
bool m_fFetchComplete; // TRUE if everything was fetched
|
||||
mutable LLUUID m_idRlvRoot;
|
||||
callback_signal_t m_OnSharedRootIDChanged;
|
||||
|
||||
private:
|
||||
static const std::string cstrSharedRoot;
|
||||
@@ -236,6 +245,13 @@ public:
|
||||
// RlvInventory inlined member functions
|
||||
//
|
||||
|
||||
// Checked: 2011-03-28 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
inline LLViewerInventoryCategory* RlvInventory::getSharedRoot() const
|
||||
{
|
||||
const LLUUID& idRlvRoot = getSharedRootID();
|
||||
return (idRlvRoot.notNull()) ? gInventory.getCategory(idRlvRoot) : NULL;
|
||||
}
|
||||
|
||||
// Checked: 2010-03-19 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||
inline bool RlvInventory::isFoldedFolder(const LLInventoryCategory* pFolder, bool fCheckComposite)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user