2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 09:51:50 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-23 19:16:30 +02:00
|
|
|
#ifndef INCLUDED_UNOTOOLS_USEROPTIONS_HXX
|
|
|
|
#define INCLUDED_UNOTOOLS_USEROPTIONS_HXX
|
2007-04-11 18:43:02 +00:00
|
|
|
|
2013-11-09 15:34:19 -06:00
|
|
|
#include <unotools/unotoolsdllapi.h>
|
2007-04-11 18:43:02 +00:00
|
|
|
#include <unotools/configitem.hxx>
|
|
|
|
#include <osl/mutex.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/options.hxx>
|
2015-02-15 20:41:33 +00:00
|
|
|
#include <memory>
|
2007-04-11 18:43:02 +00:00
|
|
|
|
|
|
|
// define ----------------------------------------------------------------
|
2015-05-05 13:18:56 +02:00
|
|
|
enum class UserOptToken
|
|
|
|
{
|
|
|
|
City = 0,
|
|
|
|
Company = 1,
|
|
|
|
Country = 2,
|
|
|
|
Email = 3,
|
|
|
|
Fax = 4,
|
|
|
|
FirstName = 5,
|
|
|
|
LastName = 6,
|
|
|
|
Position = 7,
|
|
|
|
State = 8,
|
|
|
|
Street = 9,
|
|
|
|
TelephoneHome = 10,
|
|
|
|
TelephoneWork = 11,
|
|
|
|
Title = 12,
|
|
|
|
ID = 13,
|
|
|
|
Zip = 14,
|
|
|
|
FathersName = 15,
|
|
|
|
Apartment = 16,
|
2017-12-13 18:39:10 +01:00
|
|
|
SigningKey = 17,
|
|
|
|
EncryptionKey = 18,
|
2017-12-14 13:14:02 +01:00
|
|
|
EncryptToSelf = 19,
|
|
|
|
LAST = EncryptToSelf,
|
2015-05-05 13:18:56 +02:00
|
|
|
};
|
2007-04-11 18:43:02 +00:00
|
|
|
|
|
|
|
// class SvtUserOptions --------------------------------------------------
|
|
|
|
|
2015-12-10 13:30:01 +01:00
|
|
|
class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtUserOptions : public utl::detail::Options
|
2007-04-11 18:43:02 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-08-17 10:20:17 +02:00
|
|
|
SvtUserOptions ();
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvtUserOptions () override;
|
2007-04-11 18:43:02 +00:00
|
|
|
|
2012-08-17 10:20:17 +02:00
|
|
|
static osl::Mutex& GetInitMutex ();
|
2007-04-11 18:43:02 +00:00
|
|
|
|
|
|
|
// get the address token
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString GetCompany () const;
|
|
|
|
OUString GetFirstName () const;
|
|
|
|
OUString GetLastName () const;
|
|
|
|
OUString GetID () const;
|
|
|
|
OUString GetStreet () const;
|
|
|
|
OUString GetCity () const;
|
|
|
|
OUString GetState () const;
|
|
|
|
OUString GetZip () const;
|
|
|
|
OUString GetCountry () const;
|
|
|
|
OUString GetPosition () const;
|
|
|
|
OUString GetTitle () const;
|
|
|
|
OUString GetTelephoneHome () const;
|
|
|
|
OUString GetTelephoneWork () const;
|
|
|
|
OUString GetFax () const;
|
|
|
|
OUString GetEmail () const;
|
2017-12-13 18:39:10 +01:00
|
|
|
OUString GetSigningKey () const;
|
|
|
|
OUString GetEncryptionKey () const;
|
2017-12-14 13:14:02 +01:00
|
|
|
bool GetEncryptToSelf () const;
|
2007-04-11 18:43:02 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString GetFullName () const;
|
2007-04-11 18:43:02 +00:00
|
|
|
|
2015-05-05 13:18:56 +02:00
|
|
|
bool IsTokenReadonly (UserOptToken nToken) const;
|
|
|
|
OUString GetToken (UserOptToken nToken) const;
|
|
|
|
void SetToken (UserOptToken nToken, OUString const& rNewToken);
|
2017-12-14 13:14:02 +01:00
|
|
|
void SetBoolValue (UserOptToken nToken, bool bNewValue);
|
2012-08-17 10:20:17 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
class Impl;
|
2015-02-15 20:41:33 +00:00
|
|
|
std::shared_ptr<Impl> xImpl;
|
|
|
|
static std::weak_ptr<Impl> xSharedImpl;
|
2012-08-17 10:20:17 +02:00
|
|
|
private:
|
|
|
|
class ChangeListener;
|
2007-04-11 18:43:02 +00:00
|
|
|
};
|
|
|
|
|
2013-10-23 19:16:30 +02:00
|
|
|
#endif // INCLUDED_UNOTOOLS_USEROPTIONS_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|