2 * Copyright 2001-2005 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 /* internal.h - internally visible classes
25 #ifndef __shib_internal_h__
26 #define __shib_internal_h__
29 # define _CRT_NONSTDC_NO_DEPRECATE 1
30 # define _CRT_SECURE_NO_DEPRECATE 1
31 # define SHIB_EXPORTS __declspec(dllexport)
34 // eventually we might be able to support autoconf via cygwin...
35 #if defined (_MSC_VER) || defined(__BORLANDC__)
36 # include "config_win32.h"
43 #include <log4cpp/Category.hh>
45 #define SHIB_LOGCAT "Shibboleth"
47 namespace shibboleth {
48 class ScopedAttribute : public saml::SAMLAttribute
52 const XMLCh* name=NULL,
54 const saml::QName* type=NULL,
56 const saml::Iterator<const XMLCh*>& scopes=EMPTY(const XMLCh*),
57 const saml::Iterator<const XMLCh*>& values=EMPTY(const XMLCh*)
59 ScopedAttribute(DOMElement* e);
60 ScopedAttribute(std::istream& in);
63 saml::SAMLObject* clone() const;
65 saml::Iterator<const XMLCh*> getValues() const;
66 saml::Iterator<std::string> getSingleByteValues() const;
67 void setValues(const saml::Iterator<const XMLCh*>& values=EMPTY(const XMLCh*));
68 void addValue(const XMLCh* value);
69 void removeValue(unsigned long index);
71 static const XMLCh Scope[];
73 void valueToDOM(unsigned int index, DOMElement* e) const;
74 void valueFromDOM(DOMElement* e);
77 std::vector<const XMLCh*> m_scopes;
78 mutable std::vector<const XMLCh*> m_scopedValues;