PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llmessage/llxfer_vfile.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 91 lines | 43 code | 23 blank | 25 comment | 0 complexity | 3dd86acf267243ff715306c7c5d8dab4 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llxfer_vfile.h
  3. * @brief definition of LLXfer_VFile class for a single xfer_vfile.
  4. *
  5. * $LicenseInfo:firstyear=2002&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 LL_LLXFER_VFILE_H
  27. #define LL_LLXFER_VFILE_H
  28. #include "llxfer.h"
  29. #include "llassetstorage.h"
  30. class LLVFS;
  31. class LLVFile;
  32. class LLXfer_VFile : public LLXfer
  33. {
  34. protected:
  35. LLUUID mLocalID;
  36. LLUUID mRemoteID;
  37. LLUUID mTempID;
  38. LLAssetType::EType mType;
  39. LLVFile *mVFile;
  40. LLVFS *mVFS;
  41. std::string mName;
  42. public:
  43. LLXfer_VFile ();
  44. LLXfer_VFile (LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType type);
  45. virtual ~LLXfer_VFile();
  46. virtual void init(LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType type);
  47. virtual void cleanup();
  48. virtual S32 initializeRequest(U64 xfer_id,
  49. LLVFS *vfs,
  50. const LLUUID &local_id,
  51. const LLUUID &remote_id,
  52. const LLAssetType::EType type,
  53. const LLHost &remote_host,
  54. void (*callback)(void **,S32,LLExtStat),
  55. void **user_data);
  56. virtual S32 startDownload();
  57. virtual S32 processEOF();
  58. virtual S32 startSend (U64 xfer_id, const LLHost &remote_host);
  59. virtual S32 suck(S32 start_position);
  60. virtual S32 flush();
  61. virtual BOOL matchesLocalFile(const LLUUID &id, LLAssetType::EType type);
  62. virtual BOOL matchesRemoteFile(const LLUUID &id, LLAssetType::EType type);
  63. virtual void setXferSize(S32 xfer_size);
  64. virtual S32 getMaxBufferSize();
  65. virtual U32 getXferTypeTag();
  66. virtual std::string getFileName();
  67. };
  68. #endif