accounts-qt
1.13
|
00001 /* vi: set et sw=4 ts=4 cino=t0,(0: */ 00002 /* 00003 * This file is part of libaccounts-qt 00004 * 00005 * Copyright (C) 2009-2011 Nokia Corporation. 00006 * 00007 * Contact: Alberto Mardegan <alberto.mardegan@nokia.com> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public License 00011 * version 2.1 as published by the Free Software Foundation. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 */ 00027 #ifndef ACCOUNTSCOMMON_H_ 00028 #define ACCOUNTSCOMMON_H_ 00029 00030 #ifdef BUILDING_ACCOUNTS_QT 00031 00032 // Debug macros 00033 00034 #ifdef TRACE 00035 #undef TRACE 00036 #endif 00037 00038 #include <QDebug> 00039 00040 #define TRACE() qDebug() << __FILE__ ":" << __LINE__ << __func__ 00041 00042 // String conversion 00043 00044 #ifdef ASCII 00045 #undef ASCII 00046 #endif 00047 #define ASCII(s) QLatin1String(s) 00048 00049 #ifdef UTF8 00050 #undef UTF8 00051 #endif 00052 #define UTF8(s) QString::fromUtf8(s) 00053 00054 // Symbol visibility 00055 #if __GNUC__ >= 4 00056 #define ACCOUNTS_EXPORT __attribute__ ((visibility("default"))) 00057 #endif 00058 00059 #endif // BUILDING_ACCOUNTS_QT 00060 00061 #ifndef ACCOUNTS_EXPORT 00062 #define ACCOUNTS_EXPORT 00063 #endif 00064 00065 namespace Accounts { 00066 00067 enum ReferenceMode { 00068 AddReference = 0, 00069 StealReference, 00070 }; 00071 00072 }; // namespace 00073 00074 #endif /* ACCOUNTSCOMMON_H_ */