diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 05c9d768100d83bd814fbb7bbead608036e7e2bc..d231202f403186138358e6289968d72487e110fc 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -528,3 +528,113 @@ void LLMarketplaceInventoryImporter::updateImport()
 	}
 }
 
+//
+// Direct Delivery : Marketplace tuples and data
+//
+
+// Tuple == Item
+LLMarketplaceTuple::LLMarketplaceTuple() :
+    mFolderListingId(),
+    mListingId(""),
+    mActiveVersionFolderId(),
+    mIsActive(false)
+{
+}
+
+LLMarketplaceTuple::LLMarketplaceTuple(const LLUUID& folder_id) :
+    mFolderListingId(folder_id),
+    mListingId(""),
+    mActiveVersionFolderId(),
+    mIsActive(false)
+{
+}
+
+LLMarketplaceTuple::LLMarketplaceTuple(const LLUUID& folder_id, std::string listing_id, const LLUUID& version_id, bool is_listed) :
+    mFolderListingId(folder_id),
+    mListingId(listing_id),
+    mActiveVersionFolderId(version_id),
+    mIsActive(is_listed)
+{
+}
+
+
+// Data map
+LLMarketplaceData::LLMarketplaceData()
+{
+}
+
+// Accessors
+bool LLMarketplaceData::getActivationState(const LLUUID& folder_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    return (it == mMarketplaceItems.end() ? false : (it->second).mIsActive);
+}
+std::string LLMarketplaceData::getListingID(const LLUUID& folder_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    return (it == mMarketplaceItems.end() ? "" : (it->second).mListingId);
+}
+LLUUID LLMarketplaceData::getVersionFolderID(const LLUUID& folder_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    return (it == mMarketplaceItems.end() ? LLUUID::null : (it->second).mActiveVersionFolderId);
+}
+bool LLMarketplaceData::isListed(const LLUUID& folder_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    return (it != mMarketplaceItems.end());
+}
+
+// Modifiers
+bool LLMarketplaceData::setListingID(const LLUUID& folder_id, std::string listing_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    if (it == mMarketplaceItems.end())
+    {
+        return false;
+    }
+    else
+    {
+        (it->second).mListingId = listing_id;
+        return true;
+    }
+}
+bool LLMarketplaceData::setVersionFolderID(const LLUUID& folder_id, const LLUUID& version_id)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    if (it == mMarketplaceItems.end())
+    {
+        return false;
+    }
+    else
+    {
+        (it->second).mActiveVersionFolderId = version_id;
+        return true;
+    }
+}
+bool LLMarketplaceData::setActivation(const LLUUID& folder_id, bool activate)
+{
+    marketplace_items_list_t::iterator it = mMarketplaceItems.find(folder_id);
+    if (it == mMarketplaceItems.end())
+    {
+        return false;
+    }
+    else
+    {
+        (it->second).mIsActive = activate;
+        return true;
+    }
+}
+
+// Test methods
+void LLMarketplaceData::addTestItem(const LLUUID& folder_id)
+{
+	mMarketplaceItems[folder_id] = LLMarketplaceTuple(folder_id);
+}
+void LLMarketplaceData::addTestItem(const LLUUID& folder_id, const LLUUID& version_id)
+{
+	mMarketplaceItems[folder_id] = LLMarketplaceTuple(folder_id);
+    setVersionFolderID(folder_id, version_id);
+}
+
+
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index abe60890a30c6eda48e884fa53543f8f07ecd57b..c3cde740a21cea1606693cc09adfd5ab29749d64 100755
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -109,6 +109,60 @@ class LLMarketplaceInventoryImporter
 };
 
 
+// Classes handling the data coming from and going to the Marketplace DB:
+// * implement the Marketplace API (TBD)
+// * cache the current Marketplace data (tuples)
+// * provide methods to get Marketplace data on any inventory item
+class LLMarketplaceData;
+
+// A Marketplace item is known by its tuple
+class LLMarketplaceTuple 
+{
+public:
+	friend class LLMarketplaceData;
+
+    LLMarketplaceTuple();
+    LLMarketplaceTuple(const LLUUID& folder_id);
+    LLMarketplaceTuple(const LLUUID& folder_id, std::string listing_id, const LLUUID& version_id, bool is_listed = false);
+    
+private:
+    // Representation of a marketplace item in the Marketplace DB (well, what we know of it...)
+    LLUUID mFolderListingId;
+    std::string mListingId;
+    LLUUID mActiveVersionFolderId;
+    bool mIsActive;
+};
+// The folder UUID is used as a key to this map. It could therefore be taken off the object themselves
+typedef std::map<LLUUID, LLMarketplaceTuple> marketplace_items_list_t;
+
+// There's one and only one possible set of Marketplace data per agent and per session
+class LLMarketplaceData
+    : public LLSingleton<LLMarketplaceData>
+{
+public:
+	LLMarketplaceData();
+    
+    // Access Marketplace Data : methods return default value if the folder_id can't be found
+    bool getActivationState(const LLUUID& folder_id);
+    std::string getListingID(const LLUUID& folder_id);
+    LLUUID getVersionFolderID(const LLUUID& folder_id);
+    
+    bool isListed(const LLUUID& folder_id); // returns true if folder_id is in the items map
+    
+    // Modify Marketplace Data : methods return true is function succeeded, false if error
+    bool setListingID(const LLUUID& folder_id, std::string listing_id);
+    bool setVersionFolderID(const LLUUID& folder_id, const LLUUID& version_id);
+    bool setActivation(const LLUUID& folder_id, bool activate);
+    
+    // Merov : DD Development : methods to populate the items list with something usefull using
+    // inventory IDs and some pseudo random code so we can play with the UI...
+    void addTestItem(const LLUUID& folder_id);
+    void addTestItem(const LLUUID& folder_id, const LLUUID& version_id);
+    
+private:
+    marketplace_items_list_t mMarketplaceItems;
+};
+
 
 #endif // LL_LLMARKETPLACEFUNCTIONS_H