1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <unotools/configitem.hxx>
24 #include <osl/mutex.hxx>
25 #include <unotools/options.hxx>
26 #include <boost/shared_ptr.hpp>
27 #include <boost/weak_ptr.hpp>
29 // define ----------------------------------------------------------------
31 #define USER_OPT_CITY ((sal_uInt16)0)
32 #define USER_OPT_COMPANY ((sal_uInt16)1)
33 #define USER_OPT_COUNTRY ((sal_uInt16)2)
34 #define USER_OPT_EMAIL ((sal_uInt16)3)
35 #define USER_OPT_FAX ((sal_uInt16)4)
36 #define USER_OPT_FIRSTNAME ((sal_uInt16)5)
37 #define USER_OPT_LASTNAME ((sal_uInt16)6)
38 #define USER_OPT_POSITION ((sal_uInt16)7)
39 #define USER_OPT_STATE ((sal_uInt16)8)
40 #define USER_OPT_STREET ((sal_uInt16)9)
41 #define USER_OPT_TELEPHONEHOME ((sal_uInt16)10)
42 #define USER_OPT_TELEPHONEWORK ((sal_uInt16)11)
43 #define USER_OPT_TITLE ((sal_uInt16)12)
44 #define USER_OPT_ID ((sal_uInt16)13)
45 #define USER_OPT_ZIP ((sal_uInt16)14)
46 #define USER_OPT_FATHERSNAME ((sal_uInt16)15)
47 #define USER_OPT_APARTMENT ((sal_uInt16)16)
48 #define USER_OPT_CUSTOMERNUMBER ((sal_uInt16)17)
50 // class SvtUserOptions --------------------------------------------------
52 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtUserOptions
: public utl::detail::Options
56 virtual ~SvtUserOptions ();
58 static osl::Mutex
& GetInitMutex ();
60 // get the address token
61 OUString
GetCompany () const;
62 OUString
GetFirstName () const;
63 OUString
GetLastName () const;
64 OUString
GetID () const;
65 OUString
GetStreet () const;
66 OUString
GetCity () const;
67 OUString
GetState () const;
68 OUString
GetZip () const;
69 OUString
GetCountry () const;
70 OUString
GetPosition () const;
71 OUString
GetTitle () const;
72 OUString
GetTelephoneHome () const;
73 OUString
GetTelephoneWork () const;
74 OUString
GetFax () const;
75 OUString
GetEmail () const;
76 OUString
GetCustomerNumber () const;
78 OUString
GetFullName () const;
80 // set the address token
81 void SetCustomerNumber (OUString
const&);
83 sal_Bool
IsTokenReadonly (sal_uInt16 nToken
) const;
84 OUString
GetToken (sal_uInt16 nToken
) const;
85 void SetToken (sal_uInt16 nToken
, OUString
const& rNewToken
);
89 boost::shared_ptr
<Impl
> pImpl
;
90 static boost::weak_ptr
<Impl
> pSharedImpl
;
95 #endif // #ifndef INCLUDED_unotools_USEROPTIONS_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */