PageRenderTime 22ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llviewerassetstorage.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 79 lines | 42 code | 10 blank | 27 comment | 0 complexity | f36796af70c92d6febcc028a428e37be MD5 | raw file
 1/** 
 2 * @file llviewerassetstorage.h
 3 * @brief Class for loading asset data to/from an external source.
 4 *
 5 * $LicenseInfo:firstyear=2003&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LLVIEWERASSETSTORAGE_H
28#define LLVIEWERASSETSTORAGE_H
29
30#include "llassetstorage.h"
31//#include "curl/curl.h"
32
33class LLVFile;
34
35class LLViewerAssetStorage : public LLAssetStorage
36{
37public:
38	LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
39				   LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host);
40
41	LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
42				   LLVFS *vfs, LLVFS *static_vfs);
43
44	using LLAssetStorage::storeAssetData;
45	virtual void storeAssetData(
46		const LLTransactionID& tid,
47		LLAssetType::EType atype,
48		LLStoreAssetCallback callback,
49		void* user_data,
50		bool temp_file = false,
51		bool is_priority = false,
52		bool store_local = false,
53		bool user_waiting=FALSE,
54		F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
55	
56	virtual void storeAssetData(
57		const std::string& filename,
58		const LLTransactionID& tid,
59		LLAssetType::EType type,
60		LLStoreAssetCallback callback,
61		void* user_data,
62		bool temp_file = false,
63		bool is_priority = false,
64		bool user_waiting=FALSE,
65		F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
66
67protected:
68	using LLAssetStorage::_queueDataRequest;
69
70	// virtual
71	void _queueDataRequest(const LLUUID& uuid,
72						   LLAssetType::EType type,
73						   void (*callback) (LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
74						   void *user_data,
75						   BOOL duplicate,
76						   BOOL is_priority);
77};
78
79#endif