1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: securityoptions.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef INCLUDED_SVTOOLS_SECURITYOPTIONS_HXX
31 #define INCLUDED_SVTOOLS_SECURITYOPTIONS_HXX
33 //_________________________________________________________________________________________________________________
35 //_________________________________________________________________________________________________________________
38 #include <sal/types.h>
41 #ifndef _OSL_MUTEX_HXX_
42 #include <osl/mutex.hxx>
45 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
46 #include <com/sun/star/uno/Sequence.h>
49 #ifndef _RTL_USTRING_HXX_
50 #include <rtl/ustring.hxx>
53 #ifndef INCLUDED_SVTOOLS_OPTIONS_HXX
54 #include <bf_svtools/options.hxx>
60 //_________________________________________________________________________________________________________________
61 // forward declarations
62 //_________________________________________________________________________________________________________________
64 /*-************************************************************************************************************//**
65 @short forward declaration to our private date container implementation
66 @descr We use these class as internal member to support small memory requirements.
67 You can create the container if it is neccessary. The class which use these mechanism
68 is faster and smaller then a complete implementation!
69 *//*-*************************************************************************************************************/
71 class SvtSecurityOptions_Impl
;
73 //_________________________________________________________________________________________________________________
75 //_________________________________________________________________________________________________________________
77 /*-************************************************************************************************************//**
78 @descr These values present modes to handle StarOffice basic scripts.
79 see GetBasicMode/SetBasicMode() for further informations
80 *//*-*************************************************************************************************************/
82 enum EBasicSecurityMode
89 /*-************************************************************************************************************//**
90 @short collect informations about security features
96 @ATTENTION This class is partially threadsafe.
98 @devstatus ready to use
99 *//*-*************************************************************************************************************/
101 class SvtSecurityOptions
: public Options
103 //-------------------------------------------------------------------------------------------------------------
105 //-------------------------------------------------------------------------------------------------------------
111 E_BASICMODE
, // xmlsec05 depricated
112 E_EXECUTEPLUGINS
, // xmlsec05 depricated
113 E_WARNING
, // xmlsec05 depricated
114 E_CONFIRMATION
, // xmlsec05 depricated
115 E_DOCWARN_SAVEORSEND
,
119 E_DOCWARN_REMOVEPERSONALINFO
,
120 E_DOCWARN_RECOMMENDPASSWORD
,
122 E_MACRO_TRUSTEDAUTHORS
,
124 E_CTRLCLICK_HYPERLINK
134 typedef ::com::sun::star::uno::Sequence
< ::rtl::OUString
> Certificate
;
137 // MT: Doesn't work for sequence...
140 ::rtl::OUString SubjectName;
141 ::rtl::OUString SerialNumber;
142 ::rtl::OUString RawData;
146 //-------------------------------------------------------------------------------------------------------------
148 //-------------------------------------------------------------------------------------------------------------
152 //---------------------------------------------------------------------------------------------------------
153 // constructor / destructor
154 //---------------------------------------------------------------------------------------------------------
156 /*-****************************************************************************************************//**
157 @short standard constructor and destructor
158 @descr This will initialize an instance with default values.
159 We implement these class with a refcount mechanism! Every instance of this class increase it
160 at create and decrease it at delete time - but all instances use the same data container!
161 He is implemented as a static member ...
163 @seealso member m_nRefCount
164 @seealso member m_pDataContainer
170 *//*-*****************************************************************************************************/
172 SvtSecurityOptions();
173 virtual ~SvtSecurityOptions();
175 //-------------------------------------------------------------------------------------------------------------
177 //-------------------------------------------------------------------------------------------------------------
181 /*-****************************************************************************************************//**
182 @short return a reference to a static mutex
183 @descr These class is partially threadsafe (for de-/initialization only).
184 All access methods are'nt safe!
185 We create a static mutex only for one ime and use at different times.
190 @return A reference to a static mutex member.
193 *//*-*****************************************************************************************************/
195 static ::osl::Mutex
& GetInitMutex();
197 //-------------------------------------------------------------------------------------------------------------
199 //-------------------------------------------------------------------------------------------------------------
205 Don't initialize these static member in these header!
206 a) Double dfined symbols will be detected ...
207 b) and unresolved externals exist at linking time.
208 Do it in your source only.
211 static SvtSecurityOptions_Impl
* m_pDataContainer
; /// impl. data container as dynamic pointer for smaller memory requirements!
212 static sal_Int32 m_nRefCount
; /// internal ref count mechanism
214 }; // class SvtSecurityOptions
218 #endif // #ifndef INCLUDED_SVTOOLS_SECURITYOPTIONS_HXX