diff options
Diffstat (limited to 'linden/indra/llinventory')
25 files changed, 210 insertions, 58 deletions
diff --git a/linden/indra/llinventory/llcategory.cpp b/linden/indra/llinventory/llcategory.cpp index 93f86f9..2341999 100644 --- a/linden/indra/llinventory/llcategory.cpp +++ b/linden/indra/llinventory/llcategory.cpp | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llcategory.cpp | 2 | * @file llcategory.cpp |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #include "linden_common.h" | 31 | #include "linden_common.h" |
diff --git a/linden/indra/llinventory/llcategory.h b/linden/indra/llinventory/llcategory.h index ed28a7f..c7c4067 100644 --- a/linden/indra/llinventory/llcategory.h +++ b/linden/indra/llinventory/llcategory.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llcategory.h | 2 | * @file llcategory.h |
3 | * @brief LLCategory class header file. | 3 | * @brief LLCategory class header file. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LLCATEGORY_H | 32 | #ifndef LL_LLCATEGORY_H |
diff --git a/linden/indra/llinventory/lleconomy.cpp b/linden/indra/llinventory/lleconomy.cpp index e3e909b..24e9bf1 100644 --- a/linden/indra/llinventory/lleconomy.cpp +++ b/linden/indra/llinventory/lleconomy.cpp | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file lleconomy.cpp | 2 | * @file lleconomy.cpp |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #include "linden_common.h" | 31 | #include "linden_common.h" |
diff --git a/linden/indra/llinventory/lleconomy.h b/linden/indra/llinventory/lleconomy.h index acda67e..d1e1adc 100644 --- a/linden/indra/llinventory/lleconomy.h +++ b/linden/indra/llinventory/lleconomy.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file lleconomy.h | 2 | * @file lleconomy.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLECONOMY_H | 31 | #ifndef LL_LLECONOMY_H |
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 3800de2..4d411e6 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llinventory.cpp | 2 | * @file llinventory.cpp |
3 | * @brief Implementation of the inventory system. | 3 | * @brief Implementation of the inventory system. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,12 +26,11 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
30 | 33 | ||
31 | #include <time.h> | ||
32 | |||
33 | #include "llinventory.h" | 34 | #include "llinventory.h" |
34 | 35 | ||
35 | #include "lldbstrings.h" | 36 | #include "lldbstrings.h" |
diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h index b24fe79..065c82d 100644 --- a/linden/indra/llinventory/llinventory.h +++ b/linden/indra/llinventory/llinventory.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llinventory.h | 2 | * @file llinventory.h |
3 | * @brief LLInventoryItem and LLInventoryCategory class declaration. | 3 | * @brief LLInventoryItem and LLInventoryCategory class declaration. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LLINVENTORY_H | 32 | #ifndef LL_LLINVENTORY_H |
diff --git a/linden/indra/llinventory/llinventorytype.cpp b/linden/indra/llinventory/llinventorytype.cpp index 96dfb5e..ac16cea 100644 --- a/linden/indra/llinventory/llinventorytype.cpp +++ b/linden/indra/llinventory/llinventorytype.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llinventorytype.cpp | 2 | * @file llinventorytype.cpp |
3 | * @brief Inventory item type, more specific than an asset type. | 3 | * @brief Inventory item type, more specific than an asset type. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/llinventory/llinventorytype.h b/linden/indra/llinventory/llinventorytype.h index 7d34c87..dcc2502 100644 --- a/linden/indra/llinventory/llinventorytype.h +++ b/linden/indra/llinventory/llinventorytype.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llinventorytype.h | 2 | * @file llinventorytype.h |
3 | * @brief Inventory item type, more specific than an asset type. | 3 | * @brief Inventory item type, more specific than an asset type. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LLINVENTORYTYPE_H | 32 | #ifndef LLINVENTORYTYPE_H |
diff --git a/linden/indra/llinventory/lllandmark.cpp b/linden/indra/llinventory/lllandmark.cpp index ae7a991..cac41c3 100644 --- a/linden/indra/llinventory/lllandmark.cpp +++ b/linden/indra/llinventory/lllandmark.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lllandmark.cpp | 2 | * @file lllandmark.cpp |
3 | * @brief Landmark asset class | 3 | * @brief Landmark asset class |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,15 +26,13 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
30 | #include "lllandmark.h" | 33 | #include "lllandmark.h" |
31 | 34 | ||
32 | #include <stdlib.h> | ||
33 | #include <string.h> | ||
34 | #include <errno.h> | 35 | #include <errno.h> |
35 | #include <stdio.h> // for sscanf() on linux | ||
36 | 36 | ||
37 | #include "message.h" | 37 | #include "message.h" |
38 | #include "llregionhandle.h" | 38 | #include "llregionhandle.h" |
diff --git a/linden/indra/llinventory/lllandmark.h b/linden/indra/llinventory/lllandmark.h index 69c377a..fbcd950 100644 --- a/linden/indra/llinventory/lllandmark.h +++ b/linden/indra/llinventory/lllandmark.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lllandmark.h | 2 | * @file lllandmark.h |
3 | * @brief Landmark asset class | 3 | * @brief Landmark asset class |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | 32 | ||
diff --git a/linden/indra/llinventory/llnotecard.cpp b/linden/indra/llinventory/llnotecard.cpp index 86eb5b2..733a567 100644 --- a/linden/indra/llinventory/llnotecard.cpp +++ b/linden/indra/llinventory/llnotecard.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llnotecard.cpp | 2 | * @file llnotecard.cpp |
3 | * @brief LLNotecard class definition | 3 | * @brief LLNotecard class definition |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2006-2007, Linden Research, Inc. | 7 | * Copyright (c) 2006-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
diff --git a/linden/indra/llinventory/llnotecard.h b/linden/indra/llinventory/llnotecard.h index 3d89c7a..369bf78 100644 --- a/linden/indra/llinventory/llnotecard.h +++ b/linden/indra/llinventory/llnotecard.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llnotecard.h | 2 | * @file llnotecard.h |
3 | * @brief LLNotecard class declaration | 3 | * @brief LLNotecard class declaration |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2006-2007, Linden Research, Inc. | 7 | * Copyright (c) 2006-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_NOTECARD_H | 32 | #ifndef LL_NOTECARD_H |
diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp index 5902acd..3a67385 100644 --- a/linden/indra/llinventory/llparcel.cpp +++ b/linden/indra/llinventory/llparcel.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llparcel.cpp | 2 | * @file llparcel.cpp |
3 | * @brief A land parcel. | 3 | * @brief A land parcel. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "linden_common.h" | 32 | #include "linden_common.h" |
@@ -256,42 +259,25 @@ void LLParcel::overrideParcelFlags(U32 flags) | |||
256 | mParcelFlags = flags; | 259 | mParcelFlags = flags; |
257 | } | 260 | } |
258 | 261 | ||
259 | void set_std_string(const char* src, std::string& dest) | 262 | void LLParcel::setName(const LLString& name) |
260 | { | ||
261 | if(src) | ||
262 | { | ||
263 | dest.assign(src); | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | #if (LL_LINUX && __GNUC__ < 3) | ||
268 | dest.assign(std::string("")); | ||
269 | #else | ||
270 | dest.clear(); | ||
271 | #endif | ||
272 | } | ||
273 | } | ||
274 | |||
275 | void LLParcel::setName(const char* name) | ||
276 | { | 263 | { |
277 | // The escaping here must match the escaping in the database | 264 | // The escaping here must match the escaping in the database |
278 | // abstraction layer. | 265 | // abstraction layer. |
279 | set_std_string(name, mName); | 266 | mName = name; |
280 | LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR); | 267 | LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR); |
281 | } | 268 | } |
282 | 269 | ||
283 | void LLParcel::setDesc(const char* desc) | 270 | void LLParcel::setDesc(const LLString& desc) |
284 | { | 271 | { |
285 | // The escaping here must match the escaping in the database | 272 | // The escaping here must match the escaping in the database |
286 | // abstraction layer. | 273 | // abstraction layer. |
287 | set_std_string(desc, mDesc); | 274 | mDesc = desc; |
288 | mDesc = rawstr_to_utf8(mDesc); | 275 | mDesc = rawstr_to_utf8(mDesc); |
289 | } | 276 | } |
290 | 277 | ||
291 | void LLParcel::setMusicURL(const char* url) | 278 | void LLParcel::setMusicURL(const LLString& url) |
292 | { | 279 | { |
293 | set_std_string(url, mMusicURL); | 280 | mMusicURL = url; |
294 | |||
295 | // The escaping here must match the escaping in the database | 281 | // The escaping here must match the escaping in the database |
296 | // abstraction layer. | 282 | // abstraction layer. |
297 | // This should really filter the url in some way. Other than | 283 | // This should really filter the url in some way. Other than |
@@ -299,10 +285,9 @@ void LLParcel::setMusicURL(const char* url) | |||
299 | LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR); | 285 | LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR); |
300 | } | 286 | } |
301 | 287 | ||
302 | void LLParcel::setMediaURL(const char* url) | 288 | void LLParcel::setMediaURL(const LLString& url) |
303 | { | 289 | { |
304 | set_std_string(url, mMediaURL); | 290 | mMediaURL = url; |
305 | |||
306 | // The escaping here must match the escaping in the database | 291 | // The escaping here must match the escaping in the database |
307 | // abstraction layer if it's ever added. | 292 | // abstraction layer if it's ever added. |
308 | // This should really filter the url in some way. Other than | 293 | // This should really filter the url in some way. Other than |
@@ -568,19 +553,19 @@ BOOL LLParcel::importStream(std::istream& input_stream) | |||
568 | } | 553 | } |
569 | else if ("name" == keyword) | 554 | else if ("name" == keyword) |
570 | { | 555 | { |
571 | setName( value.c_str() ); | 556 | setName( value ); |
572 | } | 557 | } |
573 | else if ("desc" == keyword) | 558 | else if ("desc" == keyword) |
574 | { | 559 | { |
575 | setDesc( value.c_str() ); | 560 | setDesc( value ); |
576 | } | 561 | } |
577 | else if ("music_url" == keyword) | 562 | else if ("music_url" == keyword) |
578 | { | 563 | { |
579 | setMusicURL( value.c_str() ); | 564 | setMusicURL( value ); |
580 | } | 565 | } |
581 | else if ("media_url" == keyword) | 566 | else if ("media_url" == keyword) |
582 | { | 567 | { |
583 | setMediaURL( value.c_str() ); | 568 | setMediaURL( value ); |
584 | } | 569 | } |
585 | else if ("media_id" == keyword) | 570 | else if ("media_id" == keyword) |
586 | { | 571 | { |
@@ -1835,3 +1820,4 @@ LLParcel::ECategory category_ui_string_to_category(const char* s) | |||
1835 | return LLParcel::C_ANY; | 1820 | return LLParcel::C_ANY; |
1836 | } | 1821 | } |
1837 | 1822 | ||
1823 | |||
diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h index 66af8ad..9c63008 100644 --- a/linden/indra/llinventory/llparcel.h +++ b/linden/indra/llinventory/llparcel.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llparcel.h | 2 | * @file llparcel.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,15 +25,12 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLPARCEL_H | 31 | #ifndef LL_LLPARCEL_H |
29 | #define LL_LLPARCEL_H | 32 | #define LL_LLPARCEL_H |
30 | 33 | ||
31 | #include <time.h> | ||
32 | #include <iostream> | ||
33 | |||
34 | #include "lldarray.h" | ||
35 | #include "lluuid.h" | 34 | #include "lluuid.h" |
36 | #include "llparcelflags.h" | 35 | #include "llparcelflags.h" |
37 | #include "llpermissions.h" | 36 | #include "llpermissions.h" |
@@ -204,10 +203,10 @@ public: | |||
204 | 203 | ||
205 | // MANIPULATORS | 204 | // MANIPULATORS |
206 | void generateNewID() { mID.generate(); } | 205 | void generateNewID() { mID.generate(); } |
207 | void setName(const char* name); | 206 | void setName(const LLString& name); |
208 | void setDesc(const char* desc); | 207 | void setDesc(const LLString& desc); |
209 | void setMusicURL(const char* url); | 208 | void setMusicURL(const LLString& url); |
210 | void setMediaURL(const char* url); | 209 | void setMediaURL(const LLString& url); |
211 | void setMediaID(const LLUUID& id) { mMediaID = id; } | 210 | void setMediaID(const LLUUID& id) { mMediaID = id; } |
212 | void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } | 211 | void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } |
213 | virtual void setLocalID(S32 local_id); | 212 | virtual void setLocalID(S32 local_id); |
@@ -257,7 +256,7 @@ public: | |||
257 | void setDrawDistance(F32 dist) { mDrawDistance = dist; } | 256 | void setDrawDistance(F32 dist) { mDrawDistance = dist; } |
258 | void setSalePrice(S32 price) { mSalePrice = price; } | 257 | void setSalePrice(S32 price) { mSalePrice = price; } |
259 | void setGroupID(const LLUUID& id) { mGroupID = id; } | 258 | void setGroupID(const LLUUID& id) { mGroupID = id; } |
260 | //void setGroupName(const char* s) { mGroupName.assign(s); } | 259 | //void setGroupName(const LLString& s) { mGroupName.assign(s); } |
261 | void setPassPrice(S32 price) { mPassPrice = price; } | 260 | void setPassPrice(S32 price) { mPassPrice = price; } |
262 | void setPassHours(F32 hours) { mPassHours = hours; } | 261 | void setPassHours(F32 hours) { mPassHours = hours; } |
263 | 262 | ||
@@ -293,10 +292,10 @@ public: | |||
293 | 292 | ||
294 | // ACCESSORS | 293 | // ACCESSORS |
295 | const LLUUID& getID() const { return mID; } | 294 | const LLUUID& getID() const { return mID; } |
296 | const char* getName() const { return mName.c_str(); } | 295 | const LLString& getName() const { return mName; } |
297 | const char* getDesc() const { return mDesc.c_str(); } | 296 | const LLString& getDesc() const { return mDesc; } |
298 | const char* getMusicURL() const { return mMusicURL.c_str(); } | 297 | const LLString& getMusicURL() const { return mMusicURL; } |
299 | const char* getMediaURL() const { return mMediaURL.c_str(); } | 298 | const LLString& getMediaURL() const { return mMediaURL; } |
300 | const LLUUID& getMediaID() const { return mMediaID; } | 299 | const LLUUID& getMediaID() const { return mMediaID; } |
301 | U8 getMediaAutoScale() const { return mMediaAutoScale; } | 300 | U8 getMediaAutoScale() const { return mMediaAutoScale; } |
302 | S32 getLocalID() const { return mLocalID; } | 301 | S32 getLocalID() const { return mLocalID; } |
@@ -568,10 +567,10 @@ protected: | |||
568 | F32 mDrawDistance; | 567 | F32 mDrawDistance; |
569 | U32 mParcelFlags; | 568 | U32 mParcelFlags; |
570 | S32 mSalePrice; // linden dollars | 569 | S32 mSalePrice; // linden dollars |
571 | std::string mName; | 570 | LLString mName; |
572 | std::string mDesc; | 571 | LLString mDesc; |
573 | std::string mMusicURL; | 572 | LLString mMusicURL; |
574 | std::string mMediaURL; | 573 | LLString mMediaURL; |
575 | U8 mMediaAutoScale; | 574 | U8 mMediaAutoScale; |
576 | LLUUID mMediaID; | 575 | LLUUID mMediaID; |
577 | S32 mPassPrice; | 576 | S32 mPassPrice; |
diff --git a/linden/indra/llinventory/llparcelflags.h b/linden/indra/llinventory/llparcelflags.h index 0c07b29..d691d4d 100644 --- a/linden/indra/llinventory/llparcelflags.h +++ b/linden/indra/llinventory/llparcelflags.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llparcelflags.h | 2 | * @file llparcelflags.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLPARCEL_FLAGS_H | 31 | #ifndef LL_LLPARCEL_FLAGS_H |
diff --git a/linden/indra/llinventory/llpermissions.cpp b/linden/indra/llinventory/llpermissions.cpp index 925b68f..8f9f73d 100644 --- a/linden/indra/llinventory/llpermissions.cpp +++ b/linden/indra/llinventory/llpermissions.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | * @author Phoenix | 3 | * @author Phoenix |
4 | * @brief Permissions for objects and inventory. | 4 | * @brief Permissions for objects and inventory. |
5 | * | 5 | * |
6 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
7 | * | ||
6 | * Copyright (c) 2002-2007, Linden Research, Inc. | 8 | * Copyright (c) 2002-2007, Linden Research, Inc. |
7 | * | 9 | * |
8 | * Second Life Viewer Source Code | 10 | * Second Life Viewer Source Code |
@@ -25,6 +27,7 @@ | |||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
27 | * COMPLETENESS OR PERFORMANCE. | 29 | * COMPLETENESS OR PERFORMANCE. |
30 | * $/LicenseInfo$ | ||
28 | */ | 31 | */ |
29 | 32 | ||
30 | #include "linden_common.h" | 33 | #include "linden_common.h" |
@@ -1140,6 +1143,12 @@ void mask_to_string(U32 mask, char* str) | |||
1140 | *str = '\0'; | 1143 | *str = '\0'; |
1141 | } | 1144 | } |
1142 | 1145 | ||
1146 | std::string mask_to_string(U32 mask) | ||
1147 | { | ||
1148 | char str[16]; | ||
1149 | mask_to_string(mask, str); | ||
1150 | return std::string(str); | ||
1151 | } | ||
1143 | 1152 | ||
1144 | ///---------------------------------------------------------------------------- | 1153 | ///---------------------------------------------------------------------------- |
1145 | /// exported functions | 1154 | /// exported functions |
diff --git a/linden/indra/llinventory/llpermissions.h b/linden/indra/llinventory/llpermissions.h index 9607a9b..9370d64 100644 --- a/linden/indra/llinventory/llpermissions.h +++ b/linden/indra/llinventory/llpermissions.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llpermissions.h | 2 | * @file llpermissions.h |
3 | * @brief Permissions structures for objects. | 3 | * @brief Permissions structures for objects. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,14 +26,12 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LLPERMISSIONS_H | 32 | #ifndef LL_LLPERMISSIONS_H |
30 | #define LL_LLPERMISSIONS_H | 33 | #define LL_LLPERMISSIONS_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include <iostream> | ||
34 | |||
35 | #include "llpermissionsflags.h" | 35 | #include "llpermissionsflags.h" |
36 | #include "llsd.h" | 36 | #include "llsd.h" |
37 | #include "lluuid.h" | 37 | #include "lluuid.h" |
@@ -41,6 +41,7 @@ | |||
41 | // prototypes | 41 | // prototypes |
42 | class LLMessageSystem; | 42 | class LLMessageSystem; |
43 | extern void mask_to_string(U32 mask, char* str); | 43 | extern void mask_to_string(U32 mask, char* str); |
44 | extern std::string mask_to_string(U32 mask); | ||
44 | template<class T> class LLMetaClassT; | 45 | template<class T> class LLMetaClassT; |
45 | 46 | ||
46 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 47 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/linden/indra/llinventory/llpermissionsflags.h b/linden/indra/llinventory/llpermissionsflags.h index 72778be..87f57e2 100644 --- a/linden/indra/llinventory/llpermissionsflags.h +++ b/linden/indra/llinventory/llpermissionsflags.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llpermissionsflags.h | 2 | * @file llpermissionsflags.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2002-2007, Linden Research, Inc. | 6 | * Copyright (c) 2002-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLPERMISSIONSFLAGS_H | 31 | #ifndef LL_LLPERMISSIONSFLAGS_H |
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp index 0258259..d0c7c72 100644 --- a/linden/indra/llinventory/llsaleinfo.cpp +++ b/linden/indra/llinventory/llsaleinfo.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llsaleinfo.cpp | 2 | * @file llsaleinfo.cpp |
3 | * @brief | 3 | * @brief |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include <iostream> | 32 | #include <iostream> |
diff --git a/linden/indra/llinventory/llsaleinfo.h b/linden/indra/llinventory/llsaleinfo.h index fd6429e..e22466b 100644 --- a/linden/indra/llinventory/llsaleinfo.h +++ b/linden/indra/llinventory/llsaleinfo.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llsaleinfo.h | 2 | * @file llsaleinfo.h |
3 | * @brief LLSaleInfo class header file. | 3 | * @brief LLSaleInfo class header file. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | 7 | * Copyright (c) 2002-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,14 +26,12 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef LL_LLSALEINFO_H | 32 | #ifndef LL_LLSALEINFO_H |
30 | #define LL_LLSALEINFO_H | 33 | #define LL_LLSALEINFO_H |
31 | 34 | ||
32 | #include <stdio.h> | ||
33 | #include <iostream> | ||
34 | |||
35 | #include "llpermissionsflags.h" | 35 | #include "llpermissionsflags.h" |
36 | #include "llsd.h" | 36 | #include "llsd.h" |
37 | #include "llxmlnode.h" | 37 | #include "llxmlnode.h" |
diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp index ffd3271..d4c97d1 100644 --- a/linden/indra/llinventory/lltransactionflags.cpp +++ b/linden/indra/llinventory/lltransactionflags.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | * @brief Some exported symbols and functions for dealing with | 3 | * @brief Some exported symbols and functions for dealing with |
4 | * transaction flags. | 4 | * transaction flags. |
5 | * | 5 | * |
6 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | ||
7 | * | ||
6 | * Copyright (c) 2003-2007, Linden Research, Inc. | 8 | * Copyright (c) 2003-2007, Linden Research, Inc. |
7 | * | 9 | * |
8 | * Second Life Viewer Source Code | 10 | * Second Life Viewer Source Code |
@@ -25,11 +27,14 @@ | |||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
27 | * COMPLETENESS OR PERFORMANCE. | 29 | * COMPLETENESS OR PERFORMANCE. |
30 | * $/LicenseInfo$ | ||
28 | */ | 31 | */ |
29 | 32 | ||
30 | #include "linden_common.h" | 33 | #include "linden_common.h" |
31 | 34 | ||
32 | #include "lltransactionflags.h" | 35 | #include "lltransactionflags.h" |
36 | #include "lltransactiontypes.h" | ||
37 | #include "lluuid.h" | ||
33 | 38 | ||
34 | const U8 TRANSACTION_FLAGS_NONE = 0; | 39 | const U8 TRANSACTION_FLAGS_NONE = 0; |
35 | const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; | 40 | const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; |
@@ -61,3 +66,85 @@ BOOL is_tf_owner_group(TransactionFlags flags) | |||
61 | return ((flags & TRANSACTION_FLAG_OWNER_GROUP) == TRANSACTION_FLAG_OWNER_GROUP); | 66 | return ((flags & TRANSACTION_FLAG_OWNER_GROUP) == TRANSACTION_FLAG_OWNER_GROUP); |
62 | } | 67 | } |
63 | 68 | ||
69 | void append_reason( | ||
70 | std::ostream& ostr, | ||
71 | S32 transaction_type, | ||
72 | const char* description) | ||
73 | { | ||
74 | switch( transaction_type ) | ||
75 | { | ||
76 | case TRANS_OBJECT_SALE: | ||
77 | ostr << " for " << (description ? description : "<unknown>"); | ||
78 | break; | ||
79 | case TRANS_LAND_SALE: | ||
80 | ostr << " for a parcel of land"; | ||
81 | break; | ||
82 | case TRANS_LAND_PASS_SALE: | ||
83 | ostr << " for a land access pass"; | ||
84 | break; | ||
85 | case TRANS_GROUP_LAND_DEED: | ||
86 | ostr << " for deeding land"; | ||
87 | default: | ||
88 | break; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | std::string build_transfer_message_to_source( | ||
93 | S32 amount, | ||
94 | const LLUUID& source_id, | ||
95 | const LLUUID& dest_id, | ||
96 | const std::string& dest_name, | ||
97 | S32 transaction_type, | ||
98 | const char* description) | ||
99 | { | ||
100 | lldebugs << "build_transfer_message_to_source: " << amount << " " | ||
101 | << source_id << " " << dest_id << " " << dest_name << " " | ||
102 | << (description?description:"(no desc)") << llendl; | ||
103 | if((0 == amount) || source_id.isNull()) return ll_safe_string(description); | ||
104 | std::ostringstream ostr; | ||
105 | if(dest_id.isNull()) | ||
106 | { | ||
107 | ostr << "You paid L$" << amount; | ||
108 | switch(transaction_type) | ||
109 | { | ||
110 | case TRANS_GROUP_CREATE: | ||
111 | ostr << " to create a group"; | ||
112 | break; | ||
113 | case TRANS_GROUP_JOIN: | ||
114 | ostr << " to join a group"; | ||
115 | break; | ||
116 | case TRANS_UPLOAD_CHARGE: | ||
117 | ostr << " to upload"; | ||
118 | break; | ||
119 | default: | ||
120 | break; | ||
121 | } | ||
122 | } | ||
123 | else | ||
124 | { | ||
125 | ostr << "You paid " << dest_name << " L$" << amount; | ||
126 | append_reason(ostr, transaction_type, description); | ||
127 | } | ||
128 | ostr << "."; | ||
129 | return ostr.str(); | ||
130 | } | ||
131 | |||
132 | std::string build_transfer_message_to_destination( | ||
133 | S32 amount, | ||
134 | const LLUUID& dest_id, | ||
135 | const LLUUID& source_id, | ||
136 | const std::string& source_name, | ||
137 | S32 transaction_type, | ||
138 | const char* description) | ||
139 | { | ||
140 | lldebugs << "build_transfer_message_to_dest: " << amount << " " | ||
141 | << dest_id << " " << source_id << " " << source_name << " " | ||
142 | << (description?description:"(no desc)") << llendl; | ||
143 | if(0 == amount) return std::string(); | ||
144 | if(dest_id.isNull()) return ll_safe_string(description); | ||
145 | std::ostringstream ostr; | ||
146 | ostr << source_name << " paid you L$" << amount; | ||
147 | append_reason(ostr, transaction_type, description); | ||
148 | ostr << "."; | ||
149 | return ostr.str(); | ||
150 | } | ||
diff --git a/linden/indra/llinventory/lltransactionflags.h b/linden/indra/llinventory/lltransactionflags.h index 3675074..f5ee9d6 100644 --- a/linden/indra/llinventory/lltransactionflags.h +++ b/linden/indra/llinventory/lltransactionflags.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file lltransactionflags.h | 2 | * @file lltransactionflags.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2003-2007, Linden Research, Inc. | 6 | * Copyright (c) 2003-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLTRANSACTIONFLAGS_H | 31 | #ifndef LL_LLTRANSACTIONFLAGS_H |
@@ -44,4 +47,22 @@ BOOL is_tf_source_group(TransactionFlags flags); | |||
44 | BOOL is_tf_dest_group(TransactionFlags flags); | 47 | BOOL is_tf_dest_group(TransactionFlags flags); |
45 | BOOL is_tf_owner_group(TransactionFlags flags); | 48 | BOOL is_tf_owner_group(TransactionFlags flags); |
46 | 49 | ||
50 | // stupid helper functions which should be replaced with some kind of | ||
51 | // internationalizeable message. | ||
52 | std::string build_transfer_message_to_source( | ||
53 | S32 amount, | ||
54 | const LLUUID& source_id, | ||
55 | const LLUUID& dest_id, | ||
56 | const std::string& dest_name, | ||
57 | S32 transaction_type, | ||
58 | const char* description); | ||
59 | |||
60 | std::string build_transfer_message_to_destination( | ||
61 | S32 amount, | ||
62 | const LLUUID& dest_id, | ||
63 | const LLUUID& source_id, | ||
64 | const std::string& source_name, | ||
65 | S32 transaction_type, | ||
66 | const char* description); | ||
67 | |||
47 | #endif // LL_LLTRANSACTIONFLAGS_H | 68 | #endif // LL_LLTRANSACTIONFLAGS_H |
diff --git a/linden/indra/llinventory/lltransactiontypes.h b/linden/indra/llinventory/lltransactiontypes.h index 6eaced9..8140370 100644 --- a/linden/indra/llinventory/lltransactiontypes.h +++ b/linden/indra/llinventory/lltransactiontypes.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file lltransactiontypes.h | 2 | * @file lltransactiontypes.h |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2003-2007, Linden Research, Inc. | 6 | * Copyright (c) 2003-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef LL_LLTRANSACTIONTYPES_H | 31 | #ifndef LL_LLTRANSACTIONTYPES_H |
diff --git a/linden/indra/llinventory/lluserrelations.cpp b/linden/indra/llinventory/lluserrelations.cpp index 5f01e51..0f1b48e 100644 --- a/linden/indra/llinventory/lluserrelations.cpp +++ b/linden/indra/llinventory/lluserrelations.cpp | |||
@@ -4,6 +4,8 @@ | |||
4 | * @date 2006-10-12 | 4 | * @date 2006-10-12 |
5 | * @brief Implementation of a simple cache of user relations. | 5 | * @brief Implementation of a simple cache of user relations. |
6 | * | 6 | * |
7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
8 | * | ||
7 | * Copyright (c) 2006-2007, Linden Research, Inc. | 9 | * Copyright (c) 2006-2007, Linden Research, Inc. |
8 | * | 10 | * |
9 | * Second Life Viewer Source Code | 11 | * Second Life Viewer Source Code |
@@ -26,6 +28,7 @@ | |||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
28 | * COMPLETENESS OR PERFORMANCE. | 30 | * COMPLETENESS OR PERFORMANCE. |
31 | * $/LicenseInfo$ | ||
29 | */ | 32 | */ |
30 | 33 | ||
31 | #include "linden_common.h" | 34 | #include "linden_common.h" |
diff --git a/linden/indra/llinventory/lluserrelations.h b/linden/indra/llinventory/lluserrelations.h index 69f5966..4483013 100644 --- a/linden/indra/llinventory/lluserrelations.h +++ b/linden/indra/llinventory/lluserrelations.h | |||
@@ -4,6 +4,8 @@ | |||
4 | * @date 2006-10-12 | 4 | * @date 2006-10-12 |
5 | * @brief Declaration of a class for handling granted rights. | 5 | * @brief Declaration of a class for handling granted rights. |
6 | * | 6 | * |
7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
8 | * | ||
7 | * Copyright (c) 2006-2007, Linden Research, Inc. | 9 | * Copyright (c) 2006-2007, Linden Research, Inc. |
8 | * | 10 | * |
9 | * Second Life Viewer Source Code | 11 | * Second Life Viewer Source Code |
@@ -26,6 +28,7 @@ | |||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
28 | * COMPLETENESS OR PERFORMANCE. | 30 | * COMPLETENESS OR PERFORMANCE. |
31 | * $/LicenseInfo$ | ||
29 | */ | 32 | */ |
30 | 33 | ||
31 | #ifndef LL_LLUSERRELAIONS_H | 34 | #ifndef LL_LLUSERRELAIONS_H |