1 /***************************************************************************
2 Copyright 2006 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
12 ***************************************************************************/
13 #ifndef FILESYNCHRONIZEMESSAGE_H
14 #define FILESYNCHRONIZEMESSAGE_H
16 #include "filecollaborationmessages.h"
17 #include "qdynamictext.h"
21 class FileSynchronizeData
{
24 explicit FileSynchronizeData( const QString
& fileName
= "", const QDynamicText
& text
= QDynamicText(), bool sendDynamic
= true );
26 template <class Archive
>
27 void serialize( Archive
& arch
, unsigned int /*version*/ ) {
31 catch( const DynamicTextError
& err
) {
32 throw Teamwork::NonFatalSerializationError( "FileSynchronizeData::serialize(): " + err
.what() );
43 VectorTimestamp
state() {
47 QDynamicTextPointer
createDynamicText();
51 VectorTimestamp m_state
;
52 SharedPtr
<QDynamicText
, BoostSerializationNormal
> m_text
;
55 EASY_DECLARE_MESSAGE( FileSynchronize
, DocumentWrapperMessage
, 3, FileSynchronizeData
, 3 );
57 BOOST_CLASS_IMPLEMENTATION( FileSynchronizeData
, boost::serialization::object_serializable
)
59 // kate: space-indent on; indent-width 2; tab-width 2; replace-tabs on
60 ///Eventually think about sending a whole history with a FileSynchronize