File: XSECEnv_8hpp-source.html

package info (click to toggle)
xml-security-c 1.2.1-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 24,472 kB
  • ctags: 6,673
  • sloc: cpp: 36,830; xml: 23,415; sh: 2,365; makefile: 340; perl: 221
file content (215 lines) | stat: -rw-r--r-- 14,833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XML-Security-C: XSECEnv.hpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a>&nbsp;/&nbsp;<a class="el" href="dir_000009.html">framework</a></div>
<h1>XSECEnv.hpp</h1><a href="XSECEnv_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment"> * Copyright 2003-2005 The Apache Software Foundation.</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00006 <span class="comment"> * You may obtain a copy of the License at</span>
00007 <span class="comment"> *</span>
00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
00014 <span class="comment"> * limitations under the License.</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="comment">/*</span>
00018 <span class="comment"> * XSEC</span>
00019 <span class="comment"> *</span>
00020 <span class="comment"> * XSECEnv := Configuration class - used by the other classes to retrieve</span>
00021 <span class="comment"> *            information on the environment they are working under</span>
00022 <span class="comment"> *</span>
00023 <span class="comment"> * $Id: XSECEnv.hpp,v 1.9 2005/06/04 11:30:26 blautenb Exp $</span>
00024 <span class="comment"> *</span>
00025 <span class="comment"> */</span>
00026 
00027 <span class="preprocessor">#ifndef XSECENV_INCLUDE</span>
00028 <span class="preprocessor"></span><span class="preprocessor">#define XSECENV_INCLUDE</span>
00029 <span class="preprocessor"></span>
00030 <span class="comment">// XSEC Includes</span>
00031 <span class="preprocessor">#include &lt;xsec/framework/XSECDefs.hpp&gt;</span>
00032 <span class="preprocessor">#include &lt;xsec/utils/XSECSafeBufferFormatter.hpp&gt;</span>
00033 
00034 <span class="preprocessor">#include &lt;vector&gt;</span>
00035 
00036 <span class="comment">// Xerces Includes</span>
00037 
00038 <span class="preprocessor">#include &lt;xercesc/dom/DOM.hpp&gt;</span>
00039 
00040 <span class="keyword">class </span><a class="code" href="classXSECURIResolver.html">XSECURIResolver</a>;
00041 
00045 <span class="comment">/*\@{*/</span>
00046 
<a name="l00057"></a><a class="code" href="classXSECEnv.html">00057</a> <span class="keyword">class </span><a class="code" href="XSECDefs_8hpp.html#a9">DSIG_EXPORT</a> <a class="code" href="classXSECEnv.html">XSECEnv</a> {
00058 
00059 <span class="keyword">public</span>:
00060     
00063     
00069     <a class="code" href="classXSECEnv.html">XSECEnv</a>(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument *doc);
00070     <a class="code" href="classXSECEnv.html">XSECEnv</a>(<span class="keyword">const</span> <a class="code" href="classXSECEnv.html">XSECEnv</a> &amp; theOther);
00071     <span class="keyword">virtual</span> ~<a class="code" href="classXSECEnv.html">XSECEnv</a>();
00072 
00074     
00077 
00098     <span class="keywordtype">void</span> setDSIGNSPrefix(<span class="keyword">const</span> XMLCh * prefix);
00099 
00116     <span class="keywordtype">void</span> setECNSPrefix(<span class="keyword">const</span> XMLCh * prefix);
00117 
00134     <span class="keywordtype">void</span> setXPFNSPrefix(<span class="keyword">const</span> XMLCh * prefix);
00135 
00143     <span class="keywordtype">void</span> setXENCNSPrefix(<span class="keyword">const</span> XMLCh * prefix);
00144 
00152     <span class="keywordtype">void</span> setXKMSNSPrefix(<span class="keyword">const</span> XMLCh * prefix);
00153 
<a name="l00162"></a><a class="code" href="classXSECEnv.html#z195_5">00162</a>     <span class="keyword">const</span> XMLCh * getDSIGNSPrefix()<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_prefixNS;}
00163 
<a name="l00171"></a><a class="code" href="classXSECEnv.html#z195_6">00171</a>     <span class="keyword">const</span> XMLCh * getECNSPrefix()<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_ecPrefixNS;}
00172 
<a name="l00180"></a><a class="code" href="classXSECEnv.html#z195_7">00180</a>     <span class="keyword">const</span> XMLCh * getXPFNSPrefix()<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_xpfPrefixNS;}
00181 
<a name="l00191"></a><a class="code" href="classXSECEnv.html#z195_8">00191</a>     <span class="keyword">const</span> XMLCh * getXENCNSPrefix(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_xencPrefixNS;}
00192 
<a name="l00202"></a><a class="code" href="classXSECEnv.html#z195_9">00202</a>     <span class="keyword">const</span> XMLCh * getXKMSNSPrefix(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_xkmsPrefixNS;}
00203     
00205 
00208 
<a name="l00220"></a><a class="code" href="classXSECEnv.html#z196_0">00220</a>     <span class="keywordtype">void</span> setPrettyPrintFlag(<span class="keywordtype">bool</span> flag) {m_prettyPrintFlag = flag;}
00221 
<a name="l00228"></a><a class="code" href="classXSECEnv.html#z196_1">00228</a>     <span class="keywordtype">bool</span> getPrettyPrintFlag(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_prettyPrintFlag;}
00229 
00242     <span class="keywordtype">void</span> doPrettyPrint(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMNode * node) <span class="keyword">const</span>;
00243 
00245     
00248 
<a name="l00259"></a><a class="code" href="classXSECEnv.html#z197_0">00259</a>     <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument * getParentDocument()<span class="keyword"> const</span>
00260 <span class="keyword">        </span>{<span class="keywordflow">return</span> mp_doc;}
00261 
<a name="l00272"></a><a class="code" href="classXSECEnv.html#z197_1">00272</a>     <span class="keywordtype">void</span> setParentDocument(<a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument * doc)
00273         {mp_doc = doc;}
00274 
00276 
00279 
00288     <span class="keywordtype">void</span> setURIResolver(<a class="code" href="classXSECURIResolver.html">XSECURIResolver</a> * resolver);
00289 
00296     <a class="code" href="classXSECURIResolver.html">XSECURIResolver</a> * getURIResolver(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00297 
00298 
00300 
00304 
00329     <span class="keywordtype">void</span> setIdByAttributeName(<span class="keywordtype">bool</span> flag);
00330 
00340     <span class="keywordtype">bool</span> getIdByAttributeName(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00341 
00354     <span class="keywordtype">void</span> registerIdAttributeName(<span class="keyword">const</span> XMLCh * name);
00355 
00366     <span class="keywordtype">bool</span> deregisterIdAttributeName(<span class="keyword">const</span> XMLCh * name);
00367 
00375     <span class="keywordtype">bool</span> isRegisteredIdAttributeName(<span class="keyword">const</span> XMLCh * name) <span class="keyword">const</span>;
00376 
00392     <span class="keywordtype">void</span> registerIdAttributeNameNS(<span class="keyword">const</span> XMLCh * ns, <span class="keyword">const</span> XMLCh * name);
00393 
00406     <span class="keywordtype">bool</span> deregisterIdAttributeNameNS(<span class="keyword">const</span> XMLCh *ns, <span class="keyword">const</span> XMLCh * name);
00407 
00417     <span class="keywordtype">bool</span> isRegisteredIdAttributeNameNS(<span class="keyword">const</span> XMLCh * ns, <span class="keyword">const</span> XMLCh * name) <span class="keyword">const</span>;
00418 
00425     <span class="keywordtype">int</span> getIdAttributeNameListSize() <span class="keyword">const</span>;
00426 
00427     <span class="comment">/*</span>
00428 <span class="comment">     * \brief Get an indexed attribute name to use as an Id</span>
00429 <span class="comment">     *</span>
00430 <span class="comment">     * Returns the item at index point in the list</span>
00431 <span class="comment">     *</span>
00432 <span class="comment">     * @note This is an internal function and should not be called directly</span>
00433 <span class="comment">     *</span>
00434 <span class="comment">     * @param index Pointer into the list</span>
00435 <span class="comment">     * @returns The indicated element or NULL if it does not exist.</span>
00436 <span class="comment">     */</span>
00437 
00438     <span class="keyword">const</span> XMLCh * getIdAttributeNameListItem(<span class="keywordtype">int</span> index) <span class="keyword">const</span>;
00439 
00440     <span class="comment">/*</span>
00441 <span class="comment">     * \brief Get an indexed attribute Namespace to use as an Id</span>
00442 <span class="comment">     *</span>
00443 <span class="comment">     * Returns the item at index point in the list</span>
00444 <span class="comment">     *</span>
00445 <span class="comment">     * @note This is an internal function and should not be called directly</span>
00446 <span class="comment">     *</span>
00447 <span class="comment">     * @param index Pointer into the list</span>
00448 <span class="comment">     * @returns The indicated element or NULL if it does not exist.</span>
00449 <span class="comment">     */</span>
00450 
00451     <span class="keyword">const</span> XMLCh * getIdAttributeNameListItemNS(<span class="keywordtype">int</span> index) <span class="keyword">const</span>;
00452 
00453     <span class="comment">/*</span>
00454 <span class="comment">     * \brief Determine whether the indexed item is namespace aware</span>
00455 <span class="comment">     *</span>
00456 <span class="comment">     * Returns the item at index point in the list</span>
00457 <span class="comment">     *</span>
00458 <span class="comment">     * @note This is an internal function and should not be called directly</span>
00459 <span class="comment">     *</span>
00460 <span class="comment">     * @param index Pointer into the list</span>
00461 <span class="comment">     * @returns The indicated element or NULL if it does not exist.</span>
00462 <span class="comment">     */</span>
00463 
00464     <span class="keywordtype">bool</span> getIdAttributeNameListItemIsNS(<span class="keywordtype">int</span> index) <span class="keyword">const</span>;
00465 
00467     
00470 
<a name="l00479"></a><a class="code" href="classXSECEnv.html#z200_0">00479</a>     <a class="code" href="classXSECSafeBufferFormatter.html">XSECSafeBufferFormatter</a> * getSBFormatter(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{<span class="keywordflow">return</span> mp_formatter;}
00480 
00482 
00483 <span class="keyword">private</span>:
00484 
00485     <span class="keyword">struct </span>IdAttributeStruct;
00486     <span class="keyword">typedef</span> <span class="keyword">struct </span>IdAttributeStruct IdAttributeType;
00487 
00488 
00489 <span class="preprocessor">#if defined(XSEC_NO_NAMESPACES)</span>
00490 <span class="preprocessor"></span>    <span class="keyword">typedef</span> vector&lt;IdAttributeType *&gt;       IdNameVectorType;
00491 <span class="preprocessor">#else</span>
00492 <span class="preprocessor"></span>    <span class="keyword">typedef</span> std::vector&lt;IdAttributeType *&gt;  IdNameVectorType;
00493 <span class="preprocessor">#endif</span>
00494 <span class="preprocessor"></span>
00495     <span class="comment">// Internal functions</span>
00496 
00497     <a class="code" href="classXSECSafeBufferFormatter.html">XSECSafeBufferFormatter</a>     * mp_formatter;
00498     <a class="code" href="XSECDefs_8hpp.html#a0">XERCES_CPP_NAMESPACE_QUALIFIER</a> DOMDocument                  
00499                                 * mp_doc;
00500     <span class="comment">// For creating functions</span>
00501     XMLCh                       * mp_prefixNS;
00502     XMLCh                       * mp_ecPrefixNS;
00503     XMLCh                       * mp_xpfPrefixNS;
00504     XMLCh                       * mp_xencPrefixNS;
00505     XMLCh                       * mp_xkmsPrefixNS;
00506 
00507     <span class="comment">// Resolvers</span>
00508     <a class="code" href="classXSECURIResolver.html">XSECURIResolver</a>             * mp_URIResolver;
00509 
00510     <span class="comment">// Flags</span>
00511     <span class="keywordtype">bool</span>                        m_prettyPrintFlag;
00512     <span class="keywordtype">bool</span>                        m_idByAttributeNameFlag;
00513 
00514     <span class="comment">// Id handling</span>
00515     IdNameVectorType            m_idAttributeNameList;  
00516 
00517     <a class="code" href="classXSECEnv.html">XSECEnv</a>();
00518 
00519     <span class="comment">/*\@}*/</span>
00520 };
00521 
00522 <span class="preprocessor">#endif </span><span class="comment">/* XSECENV_INCLUDE */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jul 3 17:37:28 2005 for XML-Security-C by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>