Browse Source

It compiles...

master
David Lanzendörfer 1 year ago
parent
commit
ddc9635fa9
7 changed files with 49 additions and 22 deletions
  1. +12
    -8
      CMakeLists.txt
  2. +3
    -3
      akonadi_pep_agent/org.freedesktop.Akonadi.pEpAgent.xml
  3. +20
    -6
      akonadi_pep_agent/pepagent.cpp
  4. +5
    -3
      akonadi_pep_agent/pepagent.h
  5. +1
    -0
      messageviewerplugin/CMakeLists.txt
  6. +7
    -1
      messageviewerplugin/viewerpluginpepinterface.cpp
  7. +1
    -1
      pEpDBusAdapter

+ 12
- 8
CMakeLists.txt View File

@ -12,8 +12,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_CXX_FLAGS_RELEASE "-fexceptions")
set(CMAKE_CXX_FLAGS_DEBUG "-g -fexceptions")
set(PIM_VERSION "5.16.2")
set(KF5_MIN_VERSION "5.75.0")
@ -52,14 +55,17 @@ include(KDEGitCommitHooks)
include(KDEInstallDirs)
include(KDEPackageAppTemplates)
include(FeatureSummary)
include(GenerateExportHeader)
include(ECMInstallIcons)
include(ECMGenerateHeaders)
include(ECMQtDeclareLoggingCategory)
include(ECMGeneratePriFile)
include(FindPkgConfig)
pkg_check_modules( dbus-c++-1 REQUIRED dbus-c++-1 )
include_directories(${dbus-c++-1_INCLUDE_DIRS})
include_directories("/home/leviathan/PEP/pEpDBusAdapter/types")
find_package(KF5IncidenceEditor ${INCIDENCEEDITOR_LIB_VERSION} CONFIG REQUIRED)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui Test)
find_package(KF5Codecs ${KF5_MIN_VERSION} CONFIG REQUIRED)
@ -112,10 +118,8 @@ find_package(Inotify)
find_package(Qca-qt5 2.2.0 CONFIG REQUIRED)
find_package(Grantlee5 ${GRANTLEE_MIN_VERSION} CONFIG REQUIRED)
#include_directories(${pEpForKDE_SOURCE_DIR}/messagelib/messageviewer/src/messagepartthemes/default)
add_subdirectory(icons)
add_subdirectory(pEpDBusAdapter)
add_subdirectory(akonadi_pep_agent)
add_subdirectory(messageviewerplugin)
#add_subdirectory(peprenderer)
#add_subdirectory(pEpDBusAdapter/src)

+ 3
- 3
akonadi_pep_agent/org.freedesktop.Akonadi.pEpAgent.xml View File

@ -2,10 +2,10 @@
<node>
<interface name="org.freedesktop.Akonadi.Agent.pEpAgent">
<method name="decryptMessage" >
<arg direction="in" type="(iiii)" name="message" />
<arg direction="in" type="ay" name="message" />
<arg direction="out" type="(iiii)" name="message" />
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const KMime::Message::Ptr &amp;"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="pEpMessage"/>
<!--<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="const KMime::Message::Ptr &amp;"/>-->
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="pEpMessage*"/>
</method>
</interface>
</node>

+ 20
- 6
akonadi_pep_agent/pepagent.cpp View File

@ -42,7 +42,7 @@ pEpAgent::pEpAgent(const QString &id)
QDBusConnection::sessionBus().registerService(service);
qDebug() << __FUNCTION__ << "Registered as " << service;
Akonadi::AttributeFactory::registerAttribute<Akonadi::Pop3ResourceAttribute>();
//Akonadi::AttributeFactory::registerAttribute<Akonadi::Pop3ResourceAttribute>();
//mTheKernel = new DummyKernel(this);
@ -71,7 +71,6 @@ pEpAgent::pEpAgent(const QString &id)
qDBusRegisterMetaType<QList<qint64> >();
QDBusConnection::sessionBus().registerObject(QStringLiteral("/pEpAgent"), this, QDBusConnection::ExportAdaptors);
/*
@ -109,8 +108,13 @@ pEpAgent::pEpAgent(const QString &id)
//new pEpSelectJob(identifier());
qCDebug(PEPAGENT_LOG) << __FUNCTION__ << " Test";
qDebug() << __FUNCTION__ << " Test";
// Here we spin up and connect to the pEp engine DBus service
m_pEpEngine = new QDBusInterface(
QStringLiteral("security.pep"),
QStringLiteral("/security/pep"),
QStringLiteral("security.pep"),
QDBusConnection::sessionBus()
);
}
//pEpAgent::~pEpAgent()
@ -321,9 +325,19 @@ void pEpAgent::retrieveCollections()
collectionsRetrieved(std::move(collections));
}
pEpMessage pEpAgent::decryptMessage(const KMime::Message::Ptr &value){
void pEpAgent::test(){
qDebug() << __FUNCTION__ << "Test";
pEpMessage ret;
}
//pEpMessage pEpAgent::decryptMessage(const KMime::Message::Ptr &value){
//pEpMessage pEpAgent::decryptMessage(QString s){
//pEpMessage* pEpAgent::decryptMessage(const KMime::Message::Ptr &value){
pEpMessage* pEpAgent::decryptMessage(const QByteArray &content)
{;
qDebug() << __FUNCTION__ << "\n" << content;
//qDebug() << m_pEpEngine->call(QStringLiteral("decrypt_message"), content);
qDebug() << m_pEpEngine->call(QStringLiteral("hello"));
pEpMessage *ret = new pEpMessage();
return ret;
}


+ 5
- 3
akonadi_pep_agent/pepagent.h View File

@ -5,13 +5,13 @@
#include <KMime/Message>
#include <KJob>
#include <QSet>
#include <QDBusInterface>
#include <AkonadiCore/AgentInstance>
#include "pepagent_p.h"
#include "pepmessage.h"
class pEpAgent :
public Akonadi::ResourceBase,
public Akonadi::AgentBase::Observer
@ -22,8 +22,9 @@ public:
explicit pEpAgent(const QString &id);
~pEpAgent() = default;
public Q_SLOTS:
pEpMessage decryptMessage(const KMime::Message::Ptr &value);
void test();
//pEpMessage* decryptMessage(const KMime::Message::Ptr &value);
pEpMessage* decryptMessage(const QByteArray &content);
protected Q_SLOTS:
void retrieveCollections() override;
@ -56,6 +57,7 @@ private:
bool isFilterableCollection(const Akonadi::Collection &collection) const;
QTimer *mProgressTimer;
QDBusInterface *m_pEpEngine;
int mProgressCounter;
};


+ 1
- 0
messageviewerplugin/CMakeLists.txt View File

@ -23,5 +23,6 @@ target_link_libraries(messageviewer_pepplugin
KF5::AkonadiWidgets
KF5::KontactInterface
dbus-c++-1
pEpDBusAdapterTypes
)

+ 7
- 1
messageviewerplugin/viewerpluginpepinterface.cpp View File

@ -100,7 +100,13 @@ void pEpViewerInterface::decryptMessage()
}
}
//mMessage->contentType()->setMimeType(QByteArray("text/plain"));
//m_pEpDBusAdapter->decrypt_message();
pEpDBusMessage src;
pEpDBusStringList keylist;
pEpDBusRating rating;
pEpDBusEncryptionFlags flags;
pEpDBusStatus status;
pEpDBusMessage dst;
m_pEpDBusAdapter->decrypt_message(src,keylist,rating,flags,status,dst);
}
void pEpViewerInterface::setMessage(const KMime::Message::Ptr &value)


+ 1
- 1
pEpDBusAdapter

@ -1 +1 @@
Subproject commit 2050f105ba0e29bf0964e843f81c2dee4ae116e4
Subproject commit 734d41fa32aefccca801431b2e0d77575e73d4b1

Loading…
Cancel
Save