bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / unotools / useroptions.hxx
blob8589f4fdea9fd53ef1386f5d30d99c23c53c6e17
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_USEROPTIONS_HXX
20 #define INCLUDED_UNOTOOLS_USEROPTIONS_HXX
22 #include <unotools/unotoolsdllapi.h>
23 #include <rtl/ustring.hxx>
24 #include <unotools/options.hxx>
25 #include <memory>
27 namespace osl { class Mutex; }
29 // define ----------------------------------------------------------------
30 enum class UserOptToken
32 City = 0,
33 Company = 1,
34 Country = 2,
35 Email = 3,
36 Fax = 4,
37 FirstName = 5,
38 LastName = 6,
39 Position = 7,
40 State = 8,
41 Street = 9,
42 TelephoneHome = 10,
43 TelephoneWork = 11,
44 Title = 12,
45 ID = 13,
46 Zip = 14,
47 FathersName = 15,
48 Apartment = 16,
49 SigningKey = 17,
50 EncryptionKey = 18,
51 EncryptToSelf = 19,
52 LAST = EncryptToSelf,
55 // class SvtUserOptions --------------------------------------------------
57 class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtUserOptions : public utl::detail::Options
59 public:
60 SvtUserOptions ();
61 virtual ~SvtUserOptions () override;
63 static osl::Mutex& GetInitMutex ();
65 // get the address token
66 OUString GetCompany () const;
67 OUString GetFirstName () const;
68 OUString GetLastName () const;
69 OUString GetID () const;
70 OUString GetStreet () const;
71 OUString GetCity () const;
72 OUString GetState () const;
73 OUString GetZip () const;
74 OUString GetCountry () const;
75 OUString GetPosition () const;
76 OUString GetTitle () const;
77 OUString GetTelephoneHome () const;
78 OUString GetTelephoneWork () const;
79 OUString GetFax () const;
80 OUString GetEmail () const;
81 OUString GetSigningKey () const;
82 OUString GetEncryptionKey () const;
83 bool GetEncryptToSelf () const;
85 OUString GetFullName () const;
87 bool IsTokenReadonly (UserOptToken nToken) const;
88 OUString GetToken (UserOptToken nToken) const;
89 void SetToken (UserOptToken nToken, OUString const& rNewToken);
90 void SetBoolValue (UserOptToken nToken, bool bNewValue);
92 private:
93 class Impl;
94 std::shared_ptr<Impl> xImpl;
95 static std::weak_ptr<Impl> xSharedImpl;
96 private:
97 class ChangeListener;
100 #endif // INCLUDED_UNOTOOLS_USEROPTIONS_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */