summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-02-26 09:27:14 -0800
committerRider Linden <rider@lindenlab.com>2018-02-26 09:27:14 -0800
commitb766466b3013e39831bcfcaef5d1089c07202afb (patch)
tree8d60793bc706efe39407cbec0a2c6c16b3bcec51 /indra/llcommon
parente9edd37cdb39639e1ab24e2e63d4f83432282c88 (diff)
Added settings inventory object with subtype
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llassettype.h5
-rw-r--r--indra/llcommon/llsdserialize.cpp10
-rw-r--r--indra/llcommon/llsdserialize.h2
3 files changed, 14 insertions, 3 deletions
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index 3a660496e3..32502d5e33 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -124,10 +124,11 @@ public:
AT_RESERVED_3 = 52,
AT_RESERVED_4 = 53,
AT_RESERVED_5 = 54,
+ AT_RESERVED_6 = 55,
- AT_SETTINGS = 55, // Collection of settings
+ AT_SETTINGS = 56, // Collection of settings
- AT_COUNT = 56,
+ AT_COUNT = 57,
// +*********************************************************+
// | TO ADD AN ELEMENT TO THIS ENUM: |
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 3a219eb998..f6ba64f0a9 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -54,6 +54,7 @@ static const int MAX_HDR_LEN = 20;
static const char LEGACY_NON_HEADER[] = "<llsd>";
const std::string LLSD_BINARY_HEADER("LLSD/Binary");
const std::string LLSD_XML_HEADER("LLSD/XML");
+const std::string LLSD_NOTATION_HEADER("llsd/notation");
//used to deflate a gzipped asset (currently used for navmeshes)
#define windowBits 15
@@ -80,6 +81,11 @@ void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize
f = new LLSDXMLFormatter;
break;
+ case LLSD_NOTATION:
+ str << "<? " << LLSD_NOTATION_HEADER << " ?>\n";
+ f = new LLSDNotationFormatter;
+ break;
+
default:
LL_WARNS() << "serialize request for unknown ELLSD_Serialize" << LL_ENDL;
}
@@ -167,6 +173,10 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
{
p = new LLSDXMLParser;
}
+ else if (header == LLSD_NOTATION_HEADER)
+ {
+ p = new LLSDNotationParser;
+ }
else
{
LL_WARNS() << "deserialize request for unknown ELLSD_Serialize" << LL_ENDL;
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index 23a0c8cfb1..cdca458e43 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -694,7 +694,7 @@ class LL_COMMON_API LLSDSerialize
public:
enum ELLSD_Serialize
{
- LLSD_BINARY, LLSD_XML
+ LLSD_BINARY, LLSD_XML, LLSD_NOTATION
};
/**