[Kde-pim] Tomboy resource: Questions to the notes specific stuff
Stefan Staeglich
staeglis at informatik.uni-freiburg.de
Sun Jun 19 17:28:41 BST 2016
Am Sonntag, 19. Juni 2016, 00:44:35 schrieb Daniel Vrátil:
> On Saturday, June 18, 2016 1:48:43 PM CEST Stefan Staeglich wrote:
> > Hi Dan,
> >
> > I have overlooked your message until now. Thanks you it helps a lot.
> >
> > Is the use of setPayload correct?
> > KMime::Message::Ptr akonadiNote = KMime::Message::Ptr(new KMime::Message);
> > akonadiNote->subject(true)->fromUnicodeString(
> > jsonNote["title"].toString(), "utf-8" );
> > akonadiNote->contentType()->setMimeType("text/plain");
> > akonadiNote->contentType()->setCharset("utf-8");
> > akonadiNote->contentTransferEncoding(true)-
> >
> > >setEncoding(KMime::Headers::CEquPr);
> >
> > akonadiNote->mainBodyPart()->fromUnicodeString(jsonNote["note-
> > content"].toString().toUtf8());
> > akonadiNote->assemble();
> > resultItem.setPayload<KMime::Message::Ptr>(akonadiNote);
>
> Looks good to me.
That's good to read :)
>
> (You don't even have to specify the type in setPayload<>, the compiler is
> clever enough to figure it out usually).
>
> Remember to call resultItem.setMimeType(), setRemoteId() and
> setParentCollection() as well.
Ok I do this. I hope this is all ;)
>
> > I want now to test my resource. First I need to test the OAuth
> > authentication, but it don't work. How can I read out the debug output
> > like
> > qCDebug(log_tomboynotesresource) << "Resource started";
>
> First make sure the logging group is enabled, by exporting it via
> QT_LOGGING_RULES env variable:
>
> export QT_LOGGING_RULES="log_tomboynotesresource.* = true"
>
> If you want all other debug info as well, you can do
>
> export QT_LOGGING_RULES="* = true
> qt.* = false"
>
> This enables all logging output except for Qt itself, because Qt is very
> verbose. Note the newline after "true", that's intended.
>
> Alternatively, you can specify the rules in a config file:
>
> [Rules]
> * = true
> qt.* = false
>
> and then
>
> export QT_LOGGING_CONF=/path/to/the/file
>
> Finally, you need to start Akonadi from the command line:
>
> akonadictl restart
>
> Now you'll see debug output from Akonadi as well as all the resources
> (unless you only enabled log_tomboynotesresource, then you'll only see
> output from that).
Unfortunately that's not working. I tried all 3 possibilities.
Stefan
>
> Dan
>
> > Thanks,
> > Stefan
> >
> > Am Samstag, 18. Juni 2016, 10:10:01 schrieb Daniel Vrátil:
> > > Hi Stefan,
> > >
> > > On Thursday, June 16, 2016 10:58:33 PM CEST Stefan Staeglich wrote:
> > > > Hello,
> > > >
> > > > I'm working on the Akonadi resource for Tomboy servers. Now I have
> > > > questions to the notes specific stuff.
> > > >
> > > > In general you can set the data with item.setpaylod. How I have to do
> > > > it with the notes content? Which informations are important?
> > >
> > > setMimeType
> > > setPayload
> > > setRemoteId
> > > setParentCollection
> > >
> > > > Is it correct using "application/x-vnd.kde.notes" as mime type?
> > >
> > > It's application/x-vnd.akonadi.note
> > >
> > >
> > > Dan
> > >
> > > > Thanks,
> > > > Stefan
> > > > _______________________________________________
> > > > KDE PIM mailing list kde-pim at kde.org
> > > > https://mail.kde.org/mailman/listinfo/kde-pim
> > > > KDE PIM home page at http://pim.kde.org/
> >
> > _______________________________________________
> > KDE PIM mailing list kde-pim at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-pim
> > KDE PIM home page at http://pim.kde.org/
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list