Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117877733
kolabconversion.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
kolabconversion.cpp
View Options
/*
* Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
*
* This program 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.
*
* 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"kolabconversion.h"
#include
"commonconversion.h"
#include
<akonadi/notes/noteutils.h>
namespace
Kolab
{
namespace
Conversion
{
Note
fromNote
(
const
KMime
::
Message
::
Ptr
&
m
)
{
Akonadi
::
NoteUtils
::
NoteMessageWrapper
note
(
m
);
Note
n
;
n
.
setSummary
(
note
.
title
().
toStdString
());
n
.
setDescription
(
note
.
text
().
toStdString
());
n
.
setCreated
(
fromDate
(
note
.
creationDate
()));
return
n
;
}
KMime
::
Message
::
Ptr
toNote
(
const
Note
&
n
)
{
Akonadi
::
NoteUtils
::
NoteMessageWrapper
note
;
note
.
setTitle
(
QString
::
fromStdString
(
n
.
summary
()));
note
.
setText
(
QString
::
fromStdString
(
n
.
description
()));
note
.
setFrom
(
"kolab@kde4"
);
note
.
setCreationDate
(
toDate
(
n
.
created
()));
return
note
.
message
();
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Apr 5, 9:37 PM (3 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9d/64/50a96767c29473f76696878f9546
Default Alt Text
kolabconversion.cpp (1 KB)
Attached To
Mode
rLK libkolab
Attached
Detach File
Event Timeline