PageRenderTime 29ms CodeModel.GetById 23ms app.highlight 4ms RepoModel.GetById 1ms 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
 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
27#ifndef LL_LLXFER_VFILE_H
28#define LL_LLXFER_VFILE_H
29
30#include "llxfer.h"
31#include "llassetstorage.h"
32
33class LLVFS;
34class LLVFile;
35
36class LLXfer_VFile : public LLXfer
37{
38 protected:
39	LLUUID mLocalID;
40	LLUUID mRemoteID;
41	LLUUID mTempID;
42	LLAssetType::EType mType;
43	
44	LLVFile *mVFile;
45
46	LLVFS *mVFS;
47
48	std::string mName;
49
50 public:
51	LLXfer_VFile ();
52	LLXfer_VFile (LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType type);
53	virtual ~LLXfer_VFile();
54
55	virtual void init(LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType type);
56	virtual void cleanup();
57
58	virtual S32 initializeRequest(U64 xfer_id,
59			LLVFS *vfs,
60			const LLUUID &local_id,
61			const LLUUID &remote_id,
62			const LLAssetType::EType type,
63			const LLHost &remote_host,
64			void (*callback)(void **,S32,LLExtStat),
65			void **user_data);
66	virtual S32 startDownload();
67
68	virtual S32 processEOF();
69	
70	virtual S32 startSend (U64 xfer_id, const LLHost &remote_host);
71
72	virtual S32 suck(S32 start_position);
73	virtual S32 flush();
74
75	virtual BOOL matchesLocalFile(const LLUUID &id, LLAssetType::EType type);
76	virtual BOOL matchesRemoteFile(const LLUUID &id, LLAssetType::EType type);
77
78	virtual void setXferSize(S32 xfer_size);
79	virtual S32  getMaxBufferSize();
80
81	virtual U32 getXferTypeTag();
82
83	virtual std::string getFileName();
84};
85
86#endif
87
88
89
90
91