3 // Conversion routines for vtodos (VCALENDAR, etc)
7 Copyright (C) 2008-2009, Nicolas VIVIEN
8 Copyright (C) 2006-2010, Net Direct Inc. (http://www.netdirect.ca/)
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 See the GNU General Public License in the COPYING file at the
20 root directory of this project for more details.
23 #ifndef __BARRY_SYNC_VTODO_H__
24 #define __BARRY_SYNC_VTODO_H__
33 namespace Barry
{ namespace Sync
{
38 /// Class for converting between RFC 2445 iCalendar data format,
39 /// and the Barry::Task class.
41 class BXEXPORT vTodo
: public vBase
44 vTimeConverter
&m_vtc
;
46 // data to pass to external requests
47 char *m_gTodoData
; // dynamic memory returned by vformat()... can
48 // be used directly by the plugin, without
49 // overmuch allocation and freeing (see Extract())
50 std::string m_vTodoData
; // copy of m_gJournalData, for C++ use
51 Barry::Task m_BarryTask
;
54 bool HasMultipleVTodos() const;
57 vTodo(vTimeConverter
&vtc
);
60 const std::string
& ToTask(const Barry::Task
&task
);
61 const Barry::Task
& ToBarry(const char *vtodo
, uint32_t RecordId
);
67 // This is the v-name of the innermost BEGIN/END block
68 static const char* GetVName() { return "VTODO"; }
71 }} // namespace Barry::Sync