xref: /AOO41X/main/xmlsecurity/source/framework/elementmark.hxx (revision ec61c6ed669d81c7df08233ccc38d0040f129ece)
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 #ifndef _ELEMENTMARK_HXX
25 #define _ELEMENTMARK_HXX
26 
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/xml/crypto/sax/ElementMarkType.hpp>
29 
30 class BufferNode;
31 
32 class ElementMark
33 /****** elementmark.hxx/CLASS ElementMark *************************************
34  *
35  *   NAME
36  *  ElementMark -- Class to manipulate an element mark
37  *
38  *   FUNCTION
39  *  This class maintains the security id, buffer id and its type for a
40  *  buffer node.
41  *
42  *   HISTORY
43  *  05.01.2004 -    implemented
44  *
45  *   AUTHOR
46  *  Michael Mi
47  *  Email: michael.mi@sun.com
48  ******************************************************************************/
49 {
50 protected:
51     /* the BufferNode maintained by this object */
52     BufferNode* m_pBufferNode;
53 
54     /* the security Id */
55     sal_Int32 m_nSecurityId;
56 
57     /* the buffer Id */
58     sal_Int32 m_nBufferId;
59 
60     /*
61      * the type value, is one of following values:
62      * TYPEOFELEMENTMARK - the default value, represents an blocker if
63      *                     not changed
64      * TYPEOFELEMENTCOLLECTOR - represents an ElementCollector
65      */
66     com::sun::star::xml::crypto::sax::ElementMarkType m_type;
67 
68 public:
69     ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId);
~ElementMark()70     virtual ~ElementMark() {};
71 
72     BufferNode* getBufferNode() const;
73     void setBufferNode(const BufferNode* pBufferNode);
74     sal_Int32 getSecurityId() const;
75     void setSecurityId(sal_Int32 nSecurityId);
76     com::sun::star::xml::crypto::sax::ElementMarkType getType() const;
77     sal_Int32 getBufferId() const;
78 };
79 
80 #endif
81 
82