accounts-qt  0.31
accountscommon.h
Go to the documentation of this file.
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-2010 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  */
23 #ifndef ACCOUNTSCOMMON_H_
24 #define ACCOUNTSCOMMON_H_
25 
26 #ifdef BUILDING_ACCOUNTS_QT
27 
28 // Debug macros
29 
30 #ifdef TRACE
31  #undef TRACE
32 #endif
33 
34 #include <QDebug>
35 
36 #define TRACE() qDebug() << __FILE__ ":" << __LINE__ << __func__
37 
38 // String conversion
39 
40 #ifdef ASCII
41  #undef ASCII
42 #endif
43 #define ASCII(s) QLatin1String(s)
44 
45 #ifdef UTF8
46  #undef UTF8
47 #endif
48 #define UTF8(s) QString::fromUtf8(s)
49 
50 // Symbol visibility
51 #if __GNUC__ >= 4
52  #define ACCOUNTS_EXPORT __attribute__ ((visibility("default")))
53 #endif
54 
55 #endif // BUILDING_ACCOUNTS_QT
56 
57 #ifndef ACCOUNTS_EXPORT
58  #define ACCOUNTS_EXPORT
59 #endif
60 
61 #endif /* ACCOUNTSCOMMON_H_ */