HarmattanSyncApplications
debian/tmp/usr/include/syncmlcommon/FolderItemParser.h
1/*
2 * This file is part of buteo-sync-plugins package
3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 *
6 * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#ifndef FOLDERITEMPARSER_H
25#define FOLDERITEMPARSER_H
26
27#include <QString>
28#include <QDateTime>
29
33{
34public:
35
37 static const QString FOLDER_MIME_TYPE;
38
40 struct FolderData {
42 QString iName;
44 QDateTime iCreated;
46 QDateTime iModified;
47 };
48
55 static bool readFolderData(const QByteArray &aRawData, FolderData &aFolderData);
56
62 static QByteArray writeFolderData(const FolderData &aFolderData);
63
64private:
65
71 static QDateTime parseDateTime(const QString &aDateTime);
72
78 static QString encodeDateTime(const QDateTime &aDateTime);
79friend class FolderItemParserTest;
80};
81
82#endif
Reads and writes data in application/vnd.omads-folder+xml format.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:33
static bool readFolderData(const QByteArray &aRawData, FolderData &aFolderData)
Parses folder data from the provided byte array.
static QByteArray writeFolderData(const FolderData &aFolderData)
Writes folder data to a byte array.
static const QString FOLDER_MIME_TYPE
Folder item MIME type.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:37
Structure for storing folder data.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:40
QDateTime iModified
Modified Time.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:46
QDateTime iCreated
Created Time.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:44
QString iName
Name of the folder.
Definition debian/tmp/usr/include/syncmlcommon/FolderItemParser.h:42