diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llmessage/llioutil.cpp | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/llmessage/llioutil.cpp')
-rw-r--r-- | linden/indra/llmessage/llioutil.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/linden/indra/llmessage/llioutil.cpp b/linden/indra/llmessage/llioutil.cpp new file mode 100644 index 0000000..76eeb02 --- /dev/null +++ b/linden/indra/llmessage/llioutil.cpp | |||
@@ -0,0 +1,95 @@ | |||
1 | /** | ||
2 | * @file llioutil.cpp | ||
3 | * @author Phoenix | ||
4 | * @date 2005-10-05 | ||
5 | * @brief Utility functionality for the io pipes. | ||
6 | * | ||
7 | * Copyright (c) 2005-2007, Linden Research, Inc. | ||
8 | * | ||
9 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
10 | * to you under the terms of the GNU General Public License, version 2.0 | ||
11 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
12 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
13 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
14 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlife.com/developers/opensource/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | */ | ||
29 | |||
30 | #include "linden_common.h" | ||
31 | #include "llioutil.h" | ||
32 | |||
33 | /** | ||
34 | * LLIOFlush | ||
35 | */ | ||
36 | LLIOPipe::EStatus LLIOFlush::process_impl( | ||
37 | const LLChannelDescriptors& channels, | ||
38 | buffer_ptr_t& buffer, | ||
39 | bool& eos, | ||
40 | LLSD& context, | ||
41 | LLPumpIO* pump) | ||
42 | { | ||
43 | eos = true; | ||
44 | return STATUS_OK; | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * @class LLIOSleep | ||
49 | */ | ||
50 | LLIOPipe::EStatus LLIOSleep::process_impl( | ||
51 | const LLChannelDescriptors& channels, | ||
52 | buffer_ptr_t& buffer, | ||
53 | bool& eos, | ||
54 | LLSD& context, | ||
55 | LLPumpIO* pump) | ||
56 | { | ||
57 | if(mSeconds > 0.0) | ||
58 | { | ||
59 | if(pump) pump->sleepChain(mSeconds); | ||
60 | mSeconds = 0.0; | ||
61 | return STATUS_BREAK; | ||
62 | } | ||
63 | return STATUS_DONE; | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | * @class LLIOAddChain | ||
68 | */ | ||
69 | LLIOPipe::EStatus LLIOAddChain::process_impl( | ||
70 | const LLChannelDescriptors& channels, | ||
71 | buffer_ptr_t& buffer, | ||
72 | bool& eos, | ||
73 | LLSD& context, | ||
74 | LLPumpIO* pump) | ||
75 | { | ||
76 | pump->addChain(mChain, mTimeout); | ||
77 | return STATUS_DONE; | ||
78 | } | ||
79 | |||
80 | /** | ||
81 | * LLChangeChannel | ||
82 | */ | ||
83 | LLChangeChannel::LLChangeChannel(S32 is, S32 becomes) : | ||
84 | mIs(is), | ||
85 | mBecomes(becomes) | ||
86 | { | ||
87 | } | ||
88 | |||
89 | void LLChangeChannel::operator()(LLSegment& segment) | ||
90 | { | ||
91 | if(segment.isOnChannel(mIs)) | ||
92 | { | ||
93 | segment.setChannel(mBecomes); | ||
94 | } | ||
95 | } | ||