accounts-qt  1.16
accountscommon.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /*
3  * This file is part of libaccounts-qt
4  *
5  * Copyright (C) 2009-2011 Nokia Corporation.
6  * Copyright (C) 2012-2016 Canonical Ltd.
7  *
8  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public License
12  * version 2.1 as published by the Free Software Foundation.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  * 02110-1301 USA
23  */
28 #ifndef ACCOUNTSCOMMON_H_
29 #define ACCOUNTSCOMMON_H_
30 
31 #ifdef BUILDING_ACCOUNTS_QT
32 
33 #include <QDebug>
34 
35 // String conversion
36 
37 #ifdef ASCII
38  #undef ASCII
39 #endif
40 #define ASCII(s) QLatin1String(s)
41 
42 #ifdef UTF8
43  #undef UTF8
44 #endif
45 #define UTF8(s) QString::fromUtf8(s)
46 
47 // Symbol visibility
48 #if __GNUC__ >= 4
49  #define ACCOUNTS_EXPORT __attribute__ ((visibility("default")))
50 #endif
51 
52 #endif // BUILDING_ACCOUNTS_QT
53 
54 #ifndef ACCOUNTS_EXPORT
55  #define ACCOUNTS_EXPORT
56 #endif
57 
58 namespace Accounts {
59 
60 enum ReferenceMode {
61  AddReference = 0,
62  StealReference,
63 };
64 
65 } // namespace
66 
67 #endif /* ACCOUNTSCOMMON_H_ */