Splashscreen ad support. Wait dialog for ad click/browser start. master
authorArttu <artt@ubuntu.ubuntu-domain>
Sat, 7 Nov 2009 11:34:47 +0000 (13:34 +0200)
committerArttu <artt@ubuntu.ubuntu-domain>
Sat, 7 Nov 2009 11:34:47 +0000 (13:34 +0200)
20 files changed:
core [deleted file]
plugins/confs/ADHERE_adconfigure.xml
plugins/confs/SOMA_adconfigure.xml
plugins/confs/template.xml [deleted file]
plugins/confs/template_adconfigure.xml [new file with mode: 0644]
qtmadsexample/mainwindow.cpp
qtmadsexample/mainwindow.h
qtmadsexample/qrc_resources.cpp
src/ADHERE/ADHERE_adconfigure.xml [deleted file]
src/ADHERE/ADHERE_servicepluginloader.h
src/SOMA/SOMA_adconfigure.xml [deleted file]
src/SOMA/SOMA_servicepluginloader.h
src/qrc_resources.cpp
src/qtmadsadwidget.cpp
src/qtmadsadwidget.h
src/qtmadsservice.cpp
src/qtmadsservice.h
src/qtmadsserviceinterface.h [deleted file]
src/qtmadsserviceloaderinterface.h [new file with mode: 0644]
src/src.pro

diff --git a/core b/core
deleted file mode 100644 (file)
index 3e3290c..0000000
Binary files a/core and /dev/null differ
index 4a32e8f..ad087c0 100644 (file)
@@ -3,7 +3,7 @@
        <accountid key="accountid" value="1"/>
        <password key="password" value="Testi1Test2"/>
        <campaign id="0">               
-               <adtype key="messagetype" value="txtAd"/>
+               <adtypedefault key="messagetype" value="txtAd"/>
                <transactionid key="transactionid" value="10:20:00:1"/>
                <language key="language" value="en"/>
        </campaign>     
index 4a32e8f..e69de29 100644 (file)
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<service name="ADHERE" url="http://www.j2madverts.com/adhere/adserver/adserver/www/delivery/requestad.php">
-       <accountid key="accountid" value="1"/>
-       <password key="password" value="Testi1Test2"/>
-       <campaign id="0">               
-               <adtype key="messagetype" value="txtAd"/>
-               <transactionid key="transactionid" value="10:20:00:1"/>
-               <language key="language" value="en"/>
-       </campaign>     
-</service>
\ No newline at end of file
diff --git a/plugins/confs/template.xml b/plugins/confs/template.xml
deleted file mode 100644 (file)
index 6e3b6df..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<service name="SERVICE_NAME" url="SERVICE_URL">
-       <accountid key="ACCOUNDTID_KEY" value="ACCOUNTID_VALUE"/>
-       <password key="PASSWORD_KEY" value="PASSWORD_VALUE"/>
-       <campaign id="CAMPAIGN_ID">             
-               <adgroup key="ADGROUP_KEY" value="ADGROUP_VALUE"/>
-               <adtype key="ADTYPE_KEY" value="DEFAULT_ADTYPE_VALUE"/>
-               <adformats key="ADFORMATS_KEY" value="ADFORMAT_VALUE1, ADFORMAT_VALUE2"/>
-               
-               <adsizeconstraint key="ADSIZECONSTRAINT_KEY" value="ADSIZECONSTRAINT_VALUE"/>           
-               <adsize key="ADSIZE_KEY" value="ADSIZE_VALUE"/>
-               <adheight key="ADHEIGHT_KEY" value="ADHEIGHT_VALUE"/>
-               <adwidth key="ADWIDTH_KEY" value="ADWIDTH_VALUE"/>
-               
-               <userid key="USERID_KEY" value="USERID_VALUE"/>
-               <transactionid key="TRANSACTION_KEY"/>
-               <language key="LANGUAGE_KEY" value="LANGUAGE_VALUE1, LANGUAGE_VALUE2"/>
-               <keywords key="KEYWORDS_KEY" value="KEYWORDS_VALUE1, KEYWORDS_VALUE2"/>         
-               
-               <parameter1 key="PARAMETER_KEY" value="PARAMETER_VALUE1, PARAMETER_VALUE2"/>
-               <parameterX key="PARAMETER_KEY" value="PARAMETER_VALUE1, PARAMETER_VALUE2"/>
-       </campaign>
-</service>
-
-
-<?xml version="1.0"?>
-<service name="SOMA" url="http://dev.soma.smaato.com:8080/wap/reqAd.jsp">
-       <accountid key="pub" value="0"/>
-       <campaign id="0">               
-               <adgroup key="adspace" value="0"/>
-               <adformats key="format" value="JPG,PNG"/>
-       </campaign>
-</service>
\ No newline at end of file
diff --git a/plugins/confs/template_adconfigure.xml b/plugins/confs/template_adconfigure.xml
new file mode 100644 (file)
index 0000000..58641a8
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!--  
+  Dynamic values always overrides these settings.
+  As default all parameters (except service name & url) are optional.
+  Only used ad service define which parameters and values are mandatory.
+  Dynamic values always overrides these settings. 
+-->
+  
+<service name="" url="">
+       <accountid key="" value=""/>
+       <password key="" value=""/>
+       <campaign id="">                
+               <!-- Ad concerning parameters. -->
+               <adgroup key="" value=""/>
+               <adtypedefault key="" value=""/>
+               <adformats key="" value="1, 2"/>
+               <adsizeconstraint key="" value=""/>             
+               <adsize key="" value=""/>
+               <adheight key="" value=""/>
+               <adwidth key="" value=""/>
+               
+               <!-- User and session concerning parameters. -->
+               <userid key="" value=""/>
+               <transactionid key="" value=""/> <!-- value should contain transactionid format -->
+               <language key="" value="1, 2"/>
+               <keywords key="" value="1, 2"/>         
+               
+               <!-- These parameters can be used to assign static values for ad parameters. -->
+               <parameter1 key="" value="1, 2"/>
+               <parameterX key="" value="1, 2"/>
+       </campaign>
+</service>
\ No newline at end of file
index 80cad91..8aae89c 100644 (file)
 #include <QWidget>
 #include <QUrl>
 #include <QDesktopServices>
+#include <QTimerEvent>
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
 {
-    QWidget *widget = new QWidget(this);
-       QGridLayout *layout = new  QGridLayout(widget);
+    widget = new QWidget(this);
+    mainLayout = new  QGridLayout(widget);
 
-       QtmadsBannerAd *adWidget1 = new QtmadsBannerAd("ADHERE", 0, noFit, this);
-       adWidget1->setAsBannerAd();
-       adWidget1->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
-       adWidget1->setMaximumSize(QSize(216,36));
-    layout->addWidget(adWidget1, 0, 0, 1, 2, Qt::AlignCenter);
+    splashScreenAd = new QtmadsLabelAd("ADHERE", 0, noFit, this);
+    splashScreenAd->setAsImageAd();
+    mainLayout->addWidget(splashScreenAd);
+    splashScreenAd->startSingleShotAd(10);
+    connect(splashScreenAd, SIGNAL(adStopped()),this, SLOT(splashStopped()));
+
+    widget->setLayout(mainLayout);
+
+    this->setCentralWidget(widget);
+}
+
+void MainWindow::splashStopped()
+{
+    qDebug() << "splashStopped()";
+    this->mainLayout->removeWidget(splashScreenAd);
+    splashScreenAd->clearAd();
+    this->init();
+}
+
+void MainWindow::init()
+{
+    QtmadsBannerAd *adWidget1 = new QtmadsBannerAd("ADHERE", 0, noFit, this);
+    adWidget1->setAsBannerAd();
+    adWidget1->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
+    adWidget1->setMaximumSize(QSize(216,36));
+    mainLayout->addWidget(adWidget1, 0, 0, 1, 2, Qt::AlignCenter);
 
     QtmadsBannerAd *adWidget2 = new QtmadsBannerAd("ADHERE", 0, noFit, this);
     adWidget2->setAsBannerAd();
     adWidget2->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
     adWidget2->setMaximumSize(QSize(216,36));
-    layout->addWidget(adWidget2, 0, 2, 1, 2, Qt::AlignCenter);
+    mainLayout->addWidget(adWidget2, 0, 2, 1, 2, Qt::AlignCenter);
 
     QtmadsBannerAd *adWidget3 = new QtmadsBannerAd("ADHERE", 0, noFit, this);
     adWidget3->setAsTextBannerAd();
@@ -40,32 +62,28 @@ MainWindow::MainWindow(QWidget *parent)
     adWidget3->setAdFontSize(18);
     adWidget3->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
     adWidget3->setMaximumSize(QSize(216,36));
-    layout->addWidget(adWidget3, 1, 0, 1, 2, Qt::AlignCenter);
+    mainLayout->addWidget(adWidget3, 1, 0, 1, 2, Qt::AlignCenter);
 
     QtmadsBannerAd *adWidget4 = new QtmadsBannerAd("ADHERE", 0, noFit, this);
     adWidget4->setAsTextBannerAd();
     adWidget4->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
     adWidget4->setMaximumSize(QSize(216,36));
-    layout->addWidget(adWidget4, 1, 2, 1, 2, Qt::AlignCenter);
+    mainLayout->addWidget(adWidget4, 1, 2, 1, 2, Qt::AlignCenter);
 
-    QtmadsLabelAd *adWidget5 = new QtmadsLabelAd("ADHERE", 0, noFit, this);
+    /*QtmadsLabelAd *adWidget5 = new QtmadsLabelAd("ADHERE", 0, noFit, this);
     adWidget5->setAsImageAd();
-    layout->addWidget(adWidget5, 2, 1, 1, 2, Qt::AlignCenter);
+    mainLayout->addWidget(adWidget5, 2, 1, 1, 2, Qt::AlignCenter);
 
     QtmadsMediaAd *audioAd = new QtmadsMediaAd("ADHERE", 0, noFit, this);
     audioAd->setAsAudioAd();
-    layout->addWidget(audioAd);
+    layout->addWidget(audioAd);*/
 
     adWidget1->startAd(30);
     adWidget2->startAd(40);
     adWidget3->startAd(30);
     adWidget4->startAd(40);
-    adWidget5->startAd();
-    audioAd->startAd(30);
-
-    widget->setLayout(layout);
-
-    this->setCentralWidget(widget);
+    /*adWidget5->startAd();
+    audioAd->startAd(30);*/
 }
 
 MainWindow::~MainWindow()
index 3efd45d..b551df0 100644 (file)
@@ -7,6 +7,9 @@
 
 #include <QtGui/QMainWindow>
 
+class QtmadsLabelAd;
+class QGridLayout;
+
 class MainWindow : public QMainWindow
 {
     Q_OBJECT
@@ -14,6 +17,16 @@ class MainWindow : public QMainWindow
 public:
     MainWindow(QWidget *parent = 0);
     ~MainWindow();
+
+    void init();
+
+public slots:
+    void splashStopped();
+
+private:
+    QWidget *widget;
+    QGridLayout *mainLayout;
+    QtmadsLabelAd *splashScreenAd;
 };
 
 #endif // MAINWINDOW_H
index abbcef7..05bbcb9 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
 ** Resource object code
 **
-** Created: Wed Oct 28 18:03:00 2009
+** Created: Sat Nov 7 09:25:02 2009
 **      by: The Resource Compiler for Qt version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost!
diff --git a/src/ADHERE/ADHERE_adconfigure.xml b/src/ADHERE/ADHERE_adconfigure.xml
deleted file mode 100644 (file)
index 4a32e8f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<service name="ADHERE" url="http://www.j2madverts.com/adhere/adserver/adserver/www/delivery/requestad.php">
-       <accountid key="accountid" value="1"/>
-       <password key="password" value="Testi1Test2"/>
-       <campaign id="0">               
-               <adtype key="messagetype" value="txtAd"/>
-               <transactionid key="transactionid" value="10:20:00:1"/>
-               <language key="language" value="en"/>
-       </campaign>     
-</service>
\ No newline at end of file
index d5139dd..512386e 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef ADHERESERVICEPLUGINLOADER_H_
 #define ADHERESERVICEPLUGINLOADER_H_
 
-#include "qtmadsserviceinterface.h"
+#include "qtmadsserviceloaderinterface.h"
 
 #include <QObject>
 
 
 #include "ADHERE_serviceplugin.h"
 
-class AdhereServicePluginLoader : public QObject, QtmadsServiceInterface
+class AdhereServicePluginLoader : public QObject, QtmadsServiceLoaderInterface
 {
     Q_OBJECT
-    Q_INTERFACES(QtmadsServiceInterface)
+    Q_INTERFACES(QtmadsServiceLoaderInterface)
 
 public:
     AdhereServicePluginLoader(){};
diff --git a/src/SOMA/SOMA_adconfigure.xml b/src/SOMA/SOMA_adconfigure.xml
deleted file mode 100644 (file)
index 4a32e8f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<service name="ADHERE" url="http://www.j2madverts.com/adhere/adserver/adserver/www/delivery/requestad.php">
-       <accountid key="accountid" value="1"/>
-       <password key="password" value="Testi1Test2"/>
-       <campaign id="0">               
-               <adtype key="messagetype" value="txtAd"/>
-               <transactionid key="transactionid" value="10:20:00:1"/>
-               <language key="language" value="en"/>
-       </campaign>     
-</service>
\ No newline at end of file
index 890d225..20d939d 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef SOMASERVICEPLUGINLOADER_H_
 #define SOMASERVICEPLUGINLOADER_H_
 
-#include "qtmadsserviceinterface.h"
+#include "qtmadsserviceloaderinterface.h"
 
 #include <QObject>
 
 
 #include "SOMA_serviceplugin.h"
 
-class SomaServicePluginLoader : public QObject, QtmadsServiceInterface
+class SomaServicePluginLoader : public QObject, QtmadsServiceLoaderInterface
 {
     Q_OBJECT
-    Q_INTERFACES(QtmadsServiceInterface)
+    Q_INTERFACES(QtmadsServiceLoaderInterface)
 
 public:
     SomaServicePluginLoader(){};
index f891041..2a6d68c 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
 ** Resource object code
 **
-** Created: Wed Oct 28 18:02:54 2009
+** Created: Sat Nov 7 09:18:26 2009
 **      by: The Resource Compiler for Qt version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost!
index 22e56a9..aefde02 100644 (file)
 #include <QTimer>
 #include <QDir>
 #include <QPluginLoader>
+#include <QMessageBox>
+#include <QAbstractButton>
 
 #include "qtmadsservice.h"
-#include "qtmadsserviceinterface.h"
+#include "qtmadsserviceloaderinterface.h"
 
 QtmadsAdWidget::QtmadsAdWidget(QString serviceName, AdType defaultType, quint32 groupId, AdFit fitting, QWidget *parent)
     : type(defaultType), adFit(fitting), QWidget(parent)
 {
-       this->loadPlugin(serviceName);
+       this->loadServicePlugin(serviceName);
        this->service->initializeService(serviceName, groupId, defaultType);
 
     adTimer = 0;
+    msgBox = 0;
 }
 
 QtmadsAdWidget::~QtmadsAdWidget()
 {
     this->clearAd();
+    emit adStopped();
 }
 
 void QtmadsAdWidget::startAd(quint32 adChangeIntervalInSecs)
 {
     getNewAd();
-
+    qDebug() << "ee";
     if(0 != adChangeIntervalInSecs){
         if(adTimer == 0){
             adTimer = new QTimer(this);
-            connect(adTimer, SIGNAL(timeout()), this, SLOT(getNewAd()));
         }else{
+            if(adTimer->isSingleShot()){
+                disconnect(adTimer, SIGNAL(timeout()), this, SLOT(singleShotEnded()));
+            }else{
+                disconnect(adTimer, SIGNAL(timeout()), this, SLOT(getNewAd()));
+            }
             adTimer->stop();
         }
+        connect(adTimer, SIGNAL(timeout()), this, SLOT(getNewAd()));
+        adTimer->setSingleShot(false);
         adTimer->start(adChangeIntervalInSecs*1000);
     }
 }
 
+void QtmadsAdWidget::startSingleShotAd(quint32 durationInSecs)
+{
+    getNewAd();
+
+    if(0 != durationInSecs){
+        if(adTimer == 0){
+            adTimer = new QTimer(this);
+        }else{
+            if(adTimer->isSingleShot()){
+                disconnect(adTimer, SIGNAL(timeout()), this, SLOT(singleShotEnded()));
+            }else{
+                disconnect(adTimer, SIGNAL(timeout()), this, SLOT(getNewAd()));
+            }
+            adTimer->stop();
+        }
+        connect(adTimer, SIGNAL(timeout()), this, SLOT(singleShotEnded()));
+        adTimer->setSingleShot(true);
+        adTimer->start(durationInSecs*1000);
+    }
+}
+
 void QtmadsAdWidget::setAdType(AdType adType)
 {
     this->type = adType;
@@ -117,7 +148,15 @@ void QtmadsAdWidget::adRequestFailed()
 void QtmadsAdWidget::adClicked(const QUrl &url)
 {
     if(url.isValid()){
-        qDebug() << "Browser opened to urli: " << url.toString();
+        qDebug() << "Browser opened to url: " << url.toString();
+        if(msgBox == 0){
+            msgBox = new QMessageBox(QMessageBox::NoIcon, tr("Opening ad"),
+                    tr("Opening ad to browser..."), QMessageBox::Cancel, this);
+       }
+        // just fixed wait time for now..
+        startTimer(10000);
+        msgBox->exec();
+
         QDesktopServices::openUrl(url);
     }
 }
@@ -128,7 +167,26 @@ void QtmadsAdWidget::clearAd()
     type = noAd;
 }
 
-bool QtmadsAdWidget::loadPlugin(QString serviceName)
+void QtmadsAdWidget::singleShotEnded()
+{
+    qDebug() << "singleShotEnded()";
+    adTimer->stop();
+    delete adTimer;
+    adTimer = 0;
+
+    this->clearAd();
+    emit adStopped();
+}
+
+void QtmadsAdWidget::timerEvent(QTimerEvent *event)
+{
+    qDebug() << "timerEvent()";
+    this->killTimer(event->timerId());
+    if(msgBox)
+        msgBox->close();
+}
+
+bool QtmadsAdWidget::loadServicePlugin(QString serviceName)
 {
     bool pluginFound = false;
     QDir pluginsDir(qApp->applicationDirPath());
@@ -149,13 +207,14 @@ bool QtmadsAdWidget::loadPlugin(QString serviceName)
             QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
             QObject *plugin = pluginLoader.instance();
             if (plugin) {
-                QtmadsServiceInterface *plugLoader = qobject_cast<QtmadsServiceInterface *>(plugin);
+                QtmadsServiceLoaderInterface *plugLoader = qobject_cast<QtmadsServiceLoaderInterface *>(plugin);
                 this->service = plugLoader->loadService();
-                if (this->service)
+                if (this->service){
                     pluginFound = true;
-                else{
+                    qDebug() << "Plugin loaded";
+                }else{
                     qDebug() << "Plugin load failed: " << pluginLoader.errorString();
-                    }
+                }
                 plugLoader = 0;
                 delete plugin;
             }else{
index 1dc1b2f..2a7fa35 100644 (file)
@@ -36,6 +36,7 @@ class QLabel;
 class QBoxLayout;
 class QWebView;
 class QTimer;
+class QMessageBox;
 
 enum AdType{
        anyAd = 1,
@@ -72,6 +73,7 @@ public:
     ~QtmadsAdWidget();
 
     void startAd(quint32 adChangeIntervalInSecs = 0);
+    void startSingleShotAd(quint32 durationInSecs);
 
     //TODO: default getAdAsHash()?
     virtual void getAdAsHash(QHash<QString, QVariant> &adParams) = 0;
@@ -82,20 +84,25 @@ protected:
     AdType adType();
 
 private:
-    bool loadPlugin(QString serviceName);
+    bool loadServicePlugin(QString serviceName);
 
 public slots:
     void getNewAd();
+    virtual void clearAd() = 0;
+    void timerEvent(QTimerEvent */*event*/);
 
+private slots:
     void adRequestSucceeded(QHash<QString, QVariant> &ad);
        void adRequestFailed();
 
     void adClicked(const QUrl &url = QUrl());
-    virtual void clearAd() = 0;
+
+    void singleShotEnded();
 
 signals:
     void newAdReady();
     void newAdFailed();
+    void adStopped();
 
 protected:
 
@@ -108,6 +115,8 @@ protected:
 private:
     QTimer *adTimer;
 
+    QMessageBox *msgBox;
+
        quint32 adClickedAmount;
 
        //TODO: shown on screen
index 47fb5d7..becfedd 100644 (file)
@@ -47,7 +47,10 @@ bool QtmadsService::initializeService(QString service, quint32 adGroup, AdType d
 
     bool parseSuccess = true;
     // ../plugins/SERVICE_NAME_adconfigure.xml
-    QFile file(CONF_PATH + this->serviceName + CONF_FILE_POSTFIX );
+    QString path("plugins/confs/");
+    path.append(this->serviceName);
+    path.append("_adconfigure.xml");
+    QFile file(path);
     parseSuccess = file.exists();
 
     /*if(!file.exists()){
@@ -64,7 +67,6 @@ bool QtmadsService::initializeService(QString service, quint32 adGroup, AdType d
     if(parseSuccess){
         initialized = true;
     }else{
-        qDebug() << "Ad service configure failed. " << CONF_PATH + this->serviceName + CONF_FILE_POSTFIX ;
         initialized = false;
         //TODO: parse failed
     }
@@ -181,7 +183,8 @@ AdType QtmadsService::defaultAdType()
 
 bool QtmadsService::parseXmlConfFile(QFile &file)
 {
-    qDebug() << "QtmadsService::parseXmlConfFile()";
+    //qDebug() << "QtmadsService::parseXmlConfFile()";
+    //TODO: apply some sanity to if-hell
     bool success = false;
     QXmlStreamReader xmlReader(&file);
 
index 7facb52..9b1cef7 100644 (file)
@@ -30,9 +30,7 @@ class QHttp;
 
 class QFile;
 
-static QString CONF_PATH = "plugins/confs/";
-static QString CONF_FILE_POSTFIX = "_adconfigure.xml";
-
+// SERVICE TAGS
 static QString TAG_SERVICE = "service";
 static QString TAG_CAMPAIGN = "campaign";
 static QString TAG_ACCOUNTID = "accountid";
@@ -42,13 +40,16 @@ static QString TAG_USERID = "userid";
 static QString TAG_LANGUAGE = "language";
 static QString TAG_TRANSACTIONID = "transactionid";
 
-static QString TAG_ADTYPE = "adtype";
+static QString TAG_ADTYPE = "adtypedefault";
 static QString TAG_TEXT = "text";
 static QString TAG_CONTENT_URL = "content_url";
 static QString TAG_URL = "url";
 static QString TAG_HTML = "html";
+
+// AD TAGS
 static QString TAG_PREFERRED_SIZE = "preferredsize";
 
+// GENERAL TAGS
 static QString TAG_KEY = "key";
 static QString TAG_VALUE = "value";
 
diff --git a/src/qtmadsserviceinterface.h b/src/qtmadsserviceinterface.h
deleted file mode 100644 (file)
index 6b848d5..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2009 Eetu Lehmusvuo.
- *
- * This file is part of QtMAds.
- *
- * QtMAds is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * QtMAds is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with QtMAds.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef QTMADSSERVICEINTERFACE_H_
-#define QTMADSSERVICEINTERFACE_H_
-
-#include "qtmadsservice.h"
-
-//class QtmadsService;
-
-class QtmadsServiceInterface
-{
-public:
-    virtual ~QtmadsServiceInterface(){};
-    virtual QtmadsService* loadService() = 0;
-};
-
-Q_DECLARE_INTERFACE(QtmadsServiceInterface, "com.qtmads.plugin.QtmadsServiceInterface/1.0");
-
-#endif /* QTMADSSERVICEINTERFACE_H_ */
diff --git a/src/qtmadsserviceloaderinterface.h b/src/qtmadsserviceloaderinterface.h
new file mode 100644 (file)
index 0000000..5ba3889
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2009 Eetu Lehmusvuo.
+ *
+ * This file is part of QtMAds.
+ *
+ * QtMAds is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * QtMAds is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with QtMAds.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef QTMADSSERVICELOADERINTERFACE_H_
+#define QTMADSSERVICELOADERNITERFACE_H_
+
+#include "qtmadsservice.h"
+
+class QtmadsServiceLoaderInterface
+{
+public:
+    virtual ~QtmadsServiceLoaderInterface(){};
+    virtual QtmadsService* loadService() = 0;
+};
+
+Q_DECLARE_INTERFACE(QtmadsServiceLoaderInterface, "com.qtmads.plugin.QtmadsServiceLoaderInterface/1.0");
+
+#endif
index 089e7b1..d00a647 100644 (file)
@@ -12,12 +12,11 @@ QT += phonon \
     network \
     webkit \
     xml
-HEADERS += \ 
+HEADERS += qtmadsserviceloaderinterface.h \
     qtmadsmediaad.h \
     qtmadslabelad.h \
     qtmadsbannerad.h \
     qtmadsadwidget.h \
-    qtmadsserviceinterface.h \
     qtmadsservice.h
 SOURCES += qtmadsmediaad.cpp \
     qtmadslabelad.cpp \