PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llmessage/llxfer_mem.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 78 lines | 37 code | 16 blank | 25 comment | 0 complexity | 21069d461c87f92610f62c1da7e92076 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llxfer_mem.h
  3. * @brief definition of LLXfer_Mem class for a single xfer
  4. *
  5. * $LicenseInfo:firstyear=2001&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_MEM_H
  27. #define LL_LLXFER_MEM_H
  28. #include "message.h"
  29. #include "lltimer.h"
  30. #include "llxfer.h"
  31. #include "lldir.h"
  32. class LLXfer_Mem : public LLXfer
  33. {
  34. private:
  35. protected:
  36. void (*mCallback)(void *, S32, void **, S32, LLExtStat);
  37. std::string mRemoteFilename;
  38. ELLPath mRemotePath;
  39. BOOL mDeleteRemoteOnCompletion;
  40. public:
  41. private:
  42. protected:
  43. public:
  44. LLXfer_Mem ();
  45. virtual ~LLXfer_Mem();
  46. virtual void init();
  47. virtual void cleanup();
  48. virtual S32 startSend (U64 xfer_id, const LLHost &remote_host);
  49. virtual U64 registerXfer(U64 xfer_id, const void *datap, const S32 length);
  50. virtual void setXferSize (S32 data_size);
  51. virtual S32 initializeRequest(U64 xfer_id,
  52. const std::string& remote_filename,
  53. ELLPath remote_path,
  54. const LLHost& remote_host,
  55. BOOL delete_remote_on_completion,
  56. void (*callback)(void*,S32,void**,S32,LLExtStat),
  57. void** user_data);
  58. virtual S32 startDownload();
  59. virtual S32 processEOF();
  60. virtual U32 getXferTypeTag();
  61. };
  62. #endif