diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmessage/llxfer_file.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/linden/indra/llmessage/llxfer_file.h b/linden/indra/llmessage/llxfer_file.h new file mode 100644 index 0000000..2a92e00 --- /dev/null +++ b/linden/indra/llmessage/llxfer_file.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /** | ||
2 | * @file llxfer_file.h | ||
3 | * @brief definition of LLXfer_File class for a single xfer_file. | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLXFER_FILE_H | ||
29 | #define LL_LLXFER_FILE_H | ||
30 | |||
31 | #include <stdio.h> | ||
32 | |||
33 | #include "llxfer.h" | ||
34 | #include "lldir.h" | ||
35 | |||
36 | class LLXfer_File : public LLXfer | ||
37 | { | ||
38 | protected: | ||
39 | FILE *mFp; | ||
40 | char mLocalFilename[LL_MAX_PATH]; /* Flawfinder : ignore */ | ||
41 | char mRemoteFilename[LL_MAX_PATH]; /* Flawfinder : ignore */ | ||
42 | ELLPath mRemotePath; | ||
43 | char mTempFilename[LL_MAX_PATH]; /* Flawfinder : ignore */ | ||
44 | |||
45 | BOOL mDeleteLocalOnCompletion; | ||
46 | BOOL mDeleteRemoteOnCompletion; | ||
47 | |||
48 | public: | ||
49 | LLXfer_File (S32 chunk_size); | ||
50 | LLXfer_File (const LLString& local_filename, BOOL delete_local_on_completion, S32 chunk_size); | ||
51 | virtual ~LLXfer_File(); | ||
52 | |||
53 | virtual void init(const LLString& local_filename, BOOL delete_local_on_completion, S32 chunk_size); | ||
54 | virtual void free(); | ||
55 | |||
56 | virtual S32 initializeRequest(U64 xfer_id, | ||
57 | const LLString& local_filename, | ||
58 | const LLString& remote_filename, | ||
59 | ELLPath remote_path, | ||
60 | const LLHost& remote_host, | ||
61 | BOOL delete_remote_on_completion, | ||
62 | void (*callback)(void**,S32), | ||
63 | void** user_data); | ||
64 | virtual S32 startDownload(); | ||
65 | |||
66 | virtual S32 processEOF(); | ||
67 | |||
68 | virtual S32 startSend (U64 xfer_id, const LLHost &remote_host); | ||
69 | |||
70 | virtual S32 suck(S32 start_position); | ||
71 | virtual S32 flush(); | ||
72 | |||
73 | virtual BOOL matchesLocalFilename(const LLString& filename); | ||
74 | virtual BOOL matchesRemoteFilename(const LLString& filename, ELLPath remote_path); | ||
75 | |||
76 | virtual S32 getMaxBufferSize(); | ||
77 | |||
78 | virtual U32 getXferTypeTag(); | ||
79 | |||
80 | virtual const char *getName(); | ||
81 | }; | ||
82 | |||
83 | #endif | ||
84 | |||
85 | |||
86 | |||
87 | |||