signonplugincommon.h

00001 /*
00002  * This file is part of signon
00003  *
00004  * Copyright (C) 2009-2010 Nokia Corporation.
00005  *
00006  * Contact: Alberto Mardegan <alberto.mardegan@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  */
00027 #ifndef SIGNONPLUGIN_H
00028 #define SIGNONPLUGIN_H
00029 
00030 #include <QtCore/qobject.h>
00031 #include <QtCore/qpointer.h>
00032 #include <QtCore/qplugin.h>
00033 
00034 #include <QVariantMap>
00035 #include "SignOn/sessiondata.h"
00036 #include "SignOn/uisessiondata.h"
00037 
00038 #ifdef SIGNON_PLUGIN_TRACE
00039     #include <QDebug>
00040 
00041     #ifdef DEBUG_ENABLED
00042         #ifdef TRACE
00043             #undef TRACE
00044         #endif
00045 
00046         #ifdef BLAME
00047             #undef BLAME
00048         #endif
00049 
00050         #define TRACE() qDebug() << __FILE__ << __LINE__ << __func__
00051         #define BLAME() qCritical() << __FILE__ << __LINE__ << __func__
00052     #else
00053         #define TRACE() while (0) qDebug()
00054         #define BLAME() while (0) qCritical()
00055     #endif
00056 #endif
00057 
00058 #endif // SIGNONPLUGIN_H