PageRenderTime 11ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 2ms 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
 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
27#ifndef LL_LLXFER_MEM_H
28#define LL_LLXFER_MEM_H
29
30#include "message.h"
31#include "lltimer.h"
32#include "llxfer.h"
33#include "lldir.h"
34
35class LLXfer_Mem : public LLXfer
36{
37 private:
38 protected:
39	void (*mCallback)(void *, S32, void **, S32, LLExtStat);	
40	std::string mRemoteFilename;
41	ELLPath mRemotePath;
42	BOOL mDeleteRemoteOnCompletion;
43
44 public:
45
46 private:
47 protected:
48 public:
49	LLXfer_Mem ();
50	virtual ~LLXfer_Mem();
51
52	virtual void init();
53	virtual void cleanup();
54
55	virtual S32 startSend (U64 xfer_id, const LLHost &remote_host);
56	virtual U64 registerXfer(U64 xfer_id, const void *datap, const S32 length);
57	virtual void setXferSize (S32 data_size);
58
59	virtual S32 initializeRequest(U64 xfer_id,
60								  const std::string& remote_filename,
61								  ELLPath remote_path,
62								  const LLHost& remote_host,
63								  BOOL delete_remote_on_completion,
64								  void (*callback)(void*,S32,void**,S32,LLExtStat),
65								  void** user_data);
66	virtual S32 startDownload();
67
68	virtual S32 processEOF();
69
70	virtual U32 getXferTypeTag();
71};
72
73#endif
74
75
76
77
78