Browse Source

Use API functions

master
David Lanzendörfer 8 months ago
parent
commit
3075b4965f
3 changed files with 7 additions and 5 deletions
  1. +4
    -2
      messageviewerplugin/pephelpers.cpp
  2. +2
    -2
      messageviewerplugin/viewerpluginpepinterface.cpp
  3. +1
    -1
      messageviewerplugin/viewerpluginpepinterface.h

+ 4
- 2
messageviewerplugin/pephelpers.cpp View File

@ -8,12 +8,13 @@ void pEpViewerInterface::convert_pEpMessage_to_mMessage(message m)
{
}
message pEpViewerInterface::convert_mMessage_to_pEpMessage()
message* pEpViewerInterface::convert_mMessage_to_pEpMessage()
{
message m;
message *m = new_message();
return m;
#if 0
m.dir=0;
m.id=""; // UTF-8 string of message ID
m.shortmsg=""; // UTF-8 string of short message
@ -85,5 +86,6 @@ message pEpViewerInterface::convert_mMessage_to_pEpMessage()
qDebug() << type;
}
}*/
#endif
}

+ 2
- 2
messageviewerplugin/viewerpluginpepinterface.cpp View File

@ -93,7 +93,7 @@ bool pEpViewerInterface::isApEpMessage(KMime::Content *content)
void pEpViewerInterface::decryptMessage()
{
message m;
message *m;
char *ms;
std::vector<std::string> keylist;
int flags, status, rating;
@ -101,7 +101,7 @@ void pEpViewerInterface::decryptMessage()
// fill the pEp message struct and turn it into a string
m = convert_mMessage_to_pEpMessage();
::mime_encode_message(&m, true, &ms, true);
::mime_encode_message(m, true, &ms, true);
src = std::string(ms);
m_pEpDBusAdapter->decrypt_message(src,keylist,rating,flags,status,dst);


+ 1
- 1
messageviewerplugin/viewerpluginpepinterface.h View File

@ -38,7 +38,7 @@ public:
private:
// glue between Akonadi and pEp:
message convert_mMessage_to_pEpMessage();
message *convert_mMessage_to_pEpMessage();
void convert_pEpMessage_to_mMessage(message m);
void decryptMessage();


Loading…
Cancel
Save