• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • kasten
  • core
  • io
  • filesystem
bytearrayrawfilewritetojob.cpp
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Kasten module, made within the KDE community.
3 
4  Copyright 2008-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #include "bytearrayrawfilewritetojob.h"
24 
25 // lib
26 // #include "externalbookmarkstorage.h"
27 #include "bytearrayrawfilesynchronizer.h"
28 #include "bytearrayrawfilewritethread.h"
29 #include "bytearraydocument.h"
30 // KDE
31 #include <KUrl>
32 // Qt
33 #include <QtCore/QCoreApplication>
34 
35 
36 namespace Kasten2
37 {
38 
39 ByteArrayRawFileWriteToJob::ByteArrayRawFileWriteToJob( ByteArrayRawFileSynchronizer *synchronizer,
40  const KUrl& url, AbstractModelSynchronizer::ConnectOption option )
41  : AbstractFileSystemSyncWithRemoteJob( synchronizer, url, option )
42 {}
43 
44 void ByteArrayRawFileWriteToJob::startSyncWithRemote()
45 {
46  ByteArrayDocument *document = qobject_cast<ByteArrayDocument*>( synchronizer()->document() );
47  ByteArrayRawFileWriteThread *writeThread = new ByteArrayRawFileWriteThread( this, document, file() );
48  writeThread->start();
49  while( !writeThread->wait(100) )
50  QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 100 );
51 
52  const bool success = writeThread->success();
53  delete writeThread;
54 
55 // if( success )
56 // ExternalBookmarkStorage().writeBookmarks( document, synchronizer()->url() );
57 
58  completeSync( success );
59 }
60 
61 ByteArrayRawFileWriteToJob::~ByteArrayRawFileWriteToJob() {}
62 
63 }
bytearrayrawfilesynchronizer.h
Kasten2::ByteArrayRawFileWriteToJob::~ByteArrayRawFileWriteToJob
virtual ~ByteArrayRawFileWriteToJob()
Definition: bytearrayrawfilewritetojob.cpp:61
Kasten2::AbstractFileSystemSyncWithRemoteJob::completeSync
void completeSync(bool success)
Definition: abstractfilesystemsyncwithremotejob.cpp:56
bytearrayrawfilewritethread.h
Kasten2::ByteArrayRawFileSynchronizer
Definition: bytearrayrawfilesynchronizer.h:37
Kasten2::AbstractModelSynchronizer::document
virtual AbstractDocument * document() const =0
Kasten2::AbstractFileSystemSyncWithRemoteJob
Definition: abstractfilesystemsyncwithremotejob.h:42
Kasten2::ByteArrayRawFileWriteThread
Definition: bytearrayrawfilewritethread.h:38
bytearrayrawfilewritetojob.h
Kasten2::ByteArrayRawFileWriteToJob::startSyncWithRemote
virtual void startSyncWithRemote()
Definition: bytearrayrawfilewritetojob.cpp:44
Kasten2::AbstractFileSystemSyncWithRemoteJob::file
QFile * file() const
Definition: abstractfilesystemsyncwithremotejob.cpp:42
Kasten2::AbstractModelSynchronizer::ConnectOption
ConnectOption
Definition: abstractmodelsynchronizer.h:66
Kasten2::ByteArrayDocument
Definition: bytearraydocument.h:54
Kasten2::ByteArrayRawFileWriteToJob::ByteArrayRawFileWriteToJob
ByteArrayRawFileWriteToJob(ByteArrayRawFileSynchronizer *synchronizer, const KUrl &url, AbstractModelSynchronizer::ConnectOption option)
Definition: bytearrayrawfilewritetojob.cpp:39
Kasten2::AbstractFileSystemSyncWithRemoteJob::synchronizer
AbstractModelFileSystemSynchronizer * synchronizer() const
Definition: abstractfilesystemsyncwithremotejob.cpp:36
bytearraydocument.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal