1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_xmlsecurity.hxx" 26 27 #include "elementmark.hxx" 28 #include "buffernode.hxx" 29 30 namespace cssxc = com::sun::star::xml::crypto; 31 32 ElementMark::ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId) 33 :m_pBufferNode(NULL), 34 m_nSecurityId(nSecurityId), 35 m_nBufferId(nBufferId), 36 m_type(cssxc::sax::ElementMarkType_ELEMENTMARK) 37 /****** ElementMark/ElementMark *********************************************** 38 * 39 * NAME 40 * ElementMark -- constructor method 41 * 42 * SYNOPSIS 43 * ElementMark(nSecurityId, nBufferId); 44 * 45 * FUNCTION 46 * construct an ElementMark object. 47 * 48 * INPUTS 49 * nSecurityId - represents which security entity the buffer node is 50 * related with. Either a signature or an encryption is 51 * a security entity. 52 * nBufferId - the id of the element bufferred in the document 53 * wrapper component. The document wrapper component 54 * uses this id to search the particular bufferred 55 * element. 56 * 57 * RESULT 58 * empty 59 * 60 * HISTORY 61 * 05.01.2004 - implemented 62 * 63 * AUTHOR 64 * Michael Mi 65 * Email: michael.mi@sun.com 66 ******************************************************************************/ 67 { 68 } 69 70 BufferNode* ElementMark::getBufferNode() const 71 { 72 return m_pBufferNode; 73 } 74 75 void ElementMark::setBufferNode(const BufferNode* pBufferNode) 76 { 77 m_pBufferNode = (BufferNode*)pBufferNode; 78 } 79 80 sal_Int32 ElementMark::getSecurityId() const 81 { 82 return m_nSecurityId; 83 } 84 85 void ElementMark::setSecurityId(sal_Int32 nSecurityId) 86 { 87 m_nSecurityId = nSecurityId; 88 } 89 90 com::sun::star::xml::crypto::sax::ElementMarkType ElementMark::getType() const 91 { 92 return m_type; 93 } 94 95 sal_Int32 ElementMark::getBufferId() const 96 { 97 return m_nBufferId; 98 } 99 100 101 102