3 // Conversion routines for vjournals (VCALENDAR, etc)
7 Copyright (C) 2008-2009, Nicolas VIVIEN
8 Copyright (C) 2006-2012, 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_VJOURNAL_H__
24 #define __BARRY_SYNC_VJOURNAL_H__
33 namespace Barry
{ namespace Sync
{
38 /// Class for converting between RFC 2445 iCalendar data format,
39 /// and the Barry::Memo class.
41 class BXEXPORT vJournal
: public vBase
44 vTimeConverter
&m_vtc
;
46 // data to pass to external requests
47 char *m_gJournalData
; // 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_vJournalData
; // copy of m_gJournalData, for C++ use
51 Barry::Memo m_BarryMemo
;
54 bool HasMultipleVJournals() const;
57 explicit vJournal(vTimeConverter
&vtc
);
60 const std::string
& ToMemo(const Barry::Memo
&memo
);
61 const Barry::Memo
& ToBarry(const char *vjournal
, uint32_t RecordId
);
63 char* ExtractVJournal();
67 // This is the v-name of the innermost BEGIN/END block
68 static const char* GetVName() { return "VJOURNAL"; }
71 }} // namespace Barry::Sync