summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-05-11 13:34:35 +0200
committerMontel Laurent <[email protected]>2015-05-11 13:34:35 +0200
commit691bd8a6b3dc31cfb7edd97cebf2b3c2c6883b8b (patch)
tree22320dd71d5de54f599dd7ab16e7a54b4fdad81f
parent44ac13478cb070e40e72077771372f6afe436376 (diff)
Start to resolve url
-rw-r--r--pimcommon/CMakeLists.txt5
-rw-r--r--pimcommon/gravatar/gravatarresolvurljob.cpp53
-rw-r--r--pimcommon/gravatar/gravatarresolvurljob.h43
3 files changed, 101 insertions, 0 deletions
diff --git a/pimcommon/CMakeLists.txt b/pimcommon/CMakeLists.txt
index 1113ff0..e100861 100644
--- a/pimcommon/CMakeLists.txt
+++ b/pimcommon/CMakeLists.txt
@@ -195,6 +195,10 @@ set(libpimcommon_temporary_SRCS
temporaryfile/attachmenttemporaryfilesdirs.cpp
)
+set(libpimcommon_gravatar_SRCS
+ gravatar/gravatarresolvurljob.cpp
+)
+
set(libpimcommon_SRCS
settings/pimcommonsettings.cpp
${libpimcommon_util_SRCS}
@@ -211,6 +215,7 @@ set(libpimcommon_SRCS
${libpimcommon_baloodebug_SRCS}
${libpimcommon_syntaxhighlighter_SRCS}
${libpimcommon_temporary_SRCS}
+ ${libpimcommon_gravatar_SRCS}
)
diff --git a/pimcommon/gravatar/gravatarresolvurljob.cpp b/pimcommon/gravatar/gravatarresolvurljob.cpp
new file mode 100644
index 0000000..c850a15
--- /dev/null
+++ b/pimcommon/gravatar/gravatarresolvurljob.cpp
@@ -0,0 +1,53 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License, version 2, as
+ published by the Free Software Foundation.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+
+#include "gravatarresolvurljob.h"
+
+using namespace PimCommon;
+
+GravatarResolvUrlJob::GravatarResolvUrlJob(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+GravatarResolvUrlJob::~GravatarResolvUrlJob()
+{
+
+}
+
+bool GravatarResolvUrlJob::canStart() const
+{
+ return !mEmail.trimmed().isEmpty();
+}
+
+void GravatarResolvUrlJob::start()
+{
+
+}
+
+QString GravatarResolvUrlJob::email() const
+{
+ return mEmail;
+}
+
+void GravatarResolvUrlJob::setEmail(const QString &email)
+{
+ mEmail = email;
+}
+
diff --git a/pimcommon/gravatar/gravatarresolvurljob.h b/pimcommon/gravatar/gravatarresolvurljob.h
new file mode 100644
index 0000000..b56f9b1
--- /dev/null
+++ b/pimcommon/gravatar/gravatarresolvurljob.h
@@ -0,0 +1,43 @@
+/*
+ Copyright (c) 2015 Montel Laurent <[email protected]>
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License, version 2, as
+ published by the Free Software Foundation.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#ifndef GRAVATARRESOLVURLJOB_H
+#define GRAVATARRESOLVURLJOB_H
+
+#include "pimcommon_export.h"
+#include <QObject>
+
+namespace PimCommon {
+class PIMCOMMON_EXPORT GravatarResolvUrlJob : public QObject
+{
+ Q_OBJECT
+public:
+ explicit GravatarResolvUrlJob(QObject *parent = 0);
+ ~GravatarResolvUrlJob();
+
+ bool canStart() const;
+ void start();
+
+ QString email() const;
+ void setEmail(const QString &email);
+
+private:
+ QString mEmail;
+};
+}
+
+#endif // GRAVATARRESOLVURLJOB_H