PageRenderTime 45ms CodeModel.GetById 21ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LLVIEWERASSETSTORAGE_H
  27. #define LLVIEWERASSETSTORAGE_H
  28. #include "llassetstorage.h"
  29. //#include "curl/curl.h"
  30. class LLVFile;
  31. class LLViewerAssetStorage : public LLAssetStorage
  32. {
  33. public:
  34. LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
  35. LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host);
  36. LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
  37. LLVFS *vfs, LLVFS *static_vfs);
  38. using LLAssetStorage::storeAssetData;
  39. virtual void storeAssetData(
  40. const LLTransactionID& tid,
  41. LLAssetType::EType atype,
  42. LLStoreAssetCallback callback,
  43. void* user_data,
  44. bool temp_file = false,
  45. bool is_priority = false,
  46. bool store_local = false,
  47. bool user_waiting=FALSE,
  48. F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
  49. virtual void storeAssetData(
  50. const std::string& filename,
  51. const LLTransactionID& tid,
  52. LLAssetType::EType type,
  53. LLStoreAssetCallback callback,
  54. void* user_data,
  55. bool temp_file = false,
  56. bool is_priority = false,
  57. bool user_waiting=FALSE,
  58. F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
  59. protected:
  60. using LLAssetStorage::_queueDataRequest;
  61. // virtual
  62. void _queueDataRequest(const LLUUID& uuid,
  63. LLAssetType::EType type,
  64. void (*callback) (LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
  65. void *user_data,
  66. BOOL duplicate,
  67. BOOL is_priority);
  68. };
  69. #endif