accounts-qt: Accounts/accountscommon.h Source File

accounts-qt 1.12

- Main Page
- Related Pages
- Classes
- Files

- File List

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 *
7 * Contact: Alberto Mardegan <alberto.mardegan@nokia.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * version 2.1 as published by the Free Software Foundation.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 */
27 #ifndef ACCOUNTSCOMMON_H_
28 #define ACCOUNTSCOMMON_H_
29
30 #ifdef BUILDING_ACCOUNTS_QT
31
32 // Debug macros
33
34 #ifdef TRACE
35 #undef TRACE
36 #endif
37
38 #include <QDebug>
39
40 #define TRACE() qDebug() << __FILE__ ":" << __LINE__ << __func__
41
42 // String conversion
43
44 #ifdef ASCII
45 #undef ASCII
46 #endif
47 #define ASCII(s) QLatin1String(s)
48
49 #ifdef UTF8
50 #undef UTF8
51 #endif
52 #define UTF8(s) QString::fromUtf8(s)
53
54 // Symbol visibility
55 #if __GNUC__ >= 4
56 #define ACCOUNTS_EXPORT __attribute__ ((visibility("default")))
57 #endif
58
59 #endif // BUILDING_ACCOUNTS_QT
60
61 #ifndef ACCOUNTS_EXPORT
62 #define ACCOUNTS_EXPORT
63 #endif
64
65 namespace Accounts {
66
67 enum ReferenceMode {
68 AddReference = 0,
69 StealReference,
70 };
71
72 }; // namespace
73
74 #endif /* ACCOUNTSCOMMON_H_ */