First version. ADHERE service support with label, banner and media ads.
[qtmads] / src / ADHERE / ADHERE_serviceplugin.h
diff --git a/src/ADHERE/ADHERE_serviceplugin.h b/src/ADHERE/ADHERE_serviceplugin.h
new file mode 100644 (file)
index 0000000..8e92bff
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * 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 ADHERESERVICEPLUGIN_H_
+#define ADHERESERVICEPLUGIN_H_
+
+#include "qtmadsservice.h"
+
+class QFile;
+
+class AdhereServicePlugin : public QtmadsService
+{
+    Q_OBJECT
+
+public:
+    AdhereServicePlugin();
+    virtual ~AdhereServicePlugin();
+    bool parseUrlParameters(
+            const QHash<QString, QVariant> &dynamicParameters, QList<QPair<QString,QString> > &parsedParameters);
+    bool parseReceivedAd(const QByteArray &response, QHash<QString, QVariant> &parsedAd);
+
+    //bool parseXmlConfFile(QFile &file);
+    virtual AdType getAdTypeFromString(QString adType);
+    virtual QString getStringFromAdType(AdType adType);
+
+private:
+    AdType reqAdType;
+};
+
+#endif /* ADHERESERVICEPLUGIN_H_ */