X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fattribute%2FExtensibleAttribute.h;h=8a128368609b0f069270eb09494287eccc96bda0;hb=4f26b89a8caae6c503490a37936562b178834f60;hp=f6eb446c11e5739ffc24bd1fc7613ddd84e70ffe;hpb=ec9f233352b9d37a3f93551b5be90f70c5cd893d;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/attribute/ExtensibleAttribute.h b/shibsp/attribute/ExtensibleAttribute.h index f6eb446..8a12836 100644 --- a/shibsp/attribute/ExtensibleAttribute.h +++ b/shibsp/attribute/ExtensibleAttribute.h @@ -1,6 +1,6 @@ /* * Copyright 2009 Internet2 - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,7 +16,7 @@ /** * @file shibsp/attribute/ExtensibleAttribute.h - * + * * An Attribute whose values are arbitrary structures. */ @@ -41,7 +41,7 @@ namespace shibsp { public: /** * Constructor. - * + * * @param ids array with primary identifier in first position, followed by any aliases * @param formatter template for serialization of values */ @@ -53,29 +53,29 @@ namespace shibsp { /** * Constructs based on a remoted ExtensibleAttribute. - * + * * @param in input object containing marshalled ExtensibleAttribute */ ExtensibleAttribute(DDF& in) : Attribute(in), m_obj(in.copy()) { } - + virtual ~ExtensibleAttribute() { m_obj.destroy(); } - + /** * Returns the set of values in a DDF list. - * + * * @return a mutable list object containing the values */ DDF getValues() { return m_obj.first(); } - + size_t valueCount() const { return m_obj.first().integer(); } - + void clearSerializedValues() { m_serialized.clear(); } @@ -96,11 +96,15 @@ namespace shibsp { } const std::vector& getSerializedValues() const; - + DDF marshall() const { + if (!isCaseSensitive()) + m_obj.addmember("case_insensitive"); + if (isInternal()) + m_obj.addmember("internal"); return m_obj.copy(); } - + private: mutable DDF m_obj; };