accounts-qt  1.14
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 #include <QDebug>
33 
34 // String conversion
35 
36 #ifdef ASCII
37  #undef ASCII
38 #endif
39 #define ASCII(s) QLatin1String(s)
40 
41 #ifdef UTF8
42  #undef UTF8
43 #endif
44 #define UTF8(s) QString::fromUtf8(s)
45 
46 // Symbol visibility
47 #if __GNUC__ >= 4
48  #define ACCOUNTS_EXPORT __attribute__ ((visibility("default")))
49 #endif
50 
51 #endif // BUILDING_ACCOUNTS_QT
52 
53 #ifndef ACCOUNTS_EXPORT
54  #define ACCOUNTS_EXPORT
55 #endif
56 
57 namespace Accounts {
58 
59 enum ReferenceMode {
60  AddReference = 0,
61  StealReference,
62 };
63 
64 } // namespace
65 
66 #endif /* ACCOUNTSCOMMON_H_ */