bump product version to 4.2.0.1
[LibreOffice.git] / include / unotools / extendedsecurityoptions.hxx
blob9963b919c04d7f1797bb66e6e7f15b5126765197
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_UNOTOOLS_EXTENDEDSECURITYOPTIONS_HXX
20 #define INCLUDED_UNOTOOLS_EXTENDEDSECURITYOPTIONS_HXX
22 #include <unotools/unotoolsdllapi.h>
23 #include <sal/types.h>
24 #include <osl/mutex.hxx>
25 #include <com/sun/star/uno/Sequence.h>
26 #include <rtl/ustring.hxx>
27 #include <unotools/options.hxx>
29 /*-************************************************************************************************************//**
30 @short forward declaration to our private date container implementation
31 @descr We use these class as internal member to support small memory requirements.
32 You can create the container if it is neccessary. The class which use these mechanism
33 is faster and smaller then a complete implementation!
34 *//*-*************************************************************************************************************/
36 class SvtExtendedSecurityOptions_Impl;
38 /*-************************************************************************************************************//**
39 @short collect information about security features
40 @descr -
42 @implements -
43 @base -
45 @ATTENTION This class is partially threadsafe.
47 @devstatus ready to use
48 *//*-*************************************************************************************************************/
50 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtExtendedSecurityOptions : public utl::detail::Options
52 public:
53 // Must be zero based!
54 enum OpenHyperlinkMode
56 OPEN_NEVER = 0,
57 OPEN_WITHSECURITYCHECK,
58 OPEN_ALWAYS
61 /*-****************************************************************************************************//**
62 @short standard constructor and destructor
63 @descr This will initialize an instance with default values.
64 We implement these class with a refcount mechanism! Every instance of this class increase it
65 at create and decrease it at delete time - but all instances use the same data container!
66 He is implemented as a static member ...
68 @seealso member m_nRefCount
69 @seealso member m_pDataContainer
71 @param -
72 @return -
74 @onerror -
75 *//*-*****************************************************************************************************/
77 SvtExtendedSecurityOptions();
78 virtual ~SvtExtendedSecurityOptions();
80 OpenHyperlinkMode GetOpenHyperlinkMode();
82 private:
84 /*-****************************************************************************************************//**
85 @short return a reference to a static mutex
86 @descr These class is partially threadsafe (for de-/initialization only).
87 All access methods are'nt safe!
88 We create a static mutex only for one ime and use at different times.
90 @seealso -
92 @param -
93 @return A reference to a static mutex member.
95 @onerror -
96 *//*-*****************************************************************************************************/
98 UNOTOOLS_DLLPRIVATE static ::osl::Mutex& GetInitMutex();
100 //-------------------------------------------------------------------------------------------------------------
101 // private member
102 //-------------------------------------------------------------------------------------------------------------
104 private:
106 /*Attention
108 Don't initialize these static member in these header!
109 a) Double dfined symbols will be detected ...
110 b) and unresolved externals exist at linking time.
111 Do it in your source only.
114 static SvtExtendedSecurityOptions_Impl* m_pDataContainer ; /// impl. data container as dynamic pointer for smaller memory requirements!
115 static sal_Int32 m_nRefCount ; /// internal ref count mechanism
117 }; // class SvtExtendedSecurityOptions
119 #endif // INCLUDED_UNOTOOLS_EXTENDEDSECURITYOPTIONS_HXX
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */