• 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
  • libs
  • kasten
  • core
  • io
  • filesystem
abstractfilesystemsyncwithremotejob_p.h
Go to the documentation of this file.
1 /*
2  This file is part of the Kasten Framework, made within the KDE community.
3 
4  Copyright 2008-2009,2011 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 #ifndef ABSTRACTFILESYSTEMSYNCWITHREMOTEJOB_P_H
24 #define ABSTRACTFILESYSTEMSYNCWITHREMOTEJOB_P_H
25 
26 // library
27 #include "abstractfilesystemsyncwithremotejob.h"
28 #include <abstractsyncwithremotejob_p.h>
29 // KDE
30 #include <KUrl>
31 
32 
33 namespace Kasten2
34 {
35 
36 class KASTENCORE_EXPORT AbstractFileSystemSyncWithRemoteJobPrivate : public AbstractSyncWithRemoteJobPrivate
37 {
38  public:
39  AbstractFileSystemSyncWithRemoteJobPrivate( AbstractFileSystemSyncWithRemoteJob* parent,
40  AbstractModelFileSystemSynchronizer* synchronizer,
41  const KUrl& url, AbstractModelSynchronizer::ConnectOption option );
42 
43  virtual ~AbstractFileSystemSyncWithRemoteJobPrivate();
44 
45  public: // KJob API
46  void start();
47 
48  protected:
49  AbstractModelFileSystemSynchronizer* synchronizer() const;
50  QFile* file() const;
51 
52  protected:
53  void completeSync( bool success );
54 
55  protected: // slots
56  void syncWithRemote();
57 
58  protected:
59  Q_DECLARE_PUBLIC( AbstractFileSystemSyncWithRemoteJob )
60 
61  protected:
62  AbstractModelFileSystemSynchronizer* const mSynchronizer;
63  const KUrl mUrl;
64  const AbstractModelSynchronizer::ConnectOption mOption;
65  QFile* mFile;
66  QString mWorkFilePath;
67 };
68 
69 
70 inline AbstractFileSystemSyncWithRemoteJobPrivate::AbstractFileSystemSyncWithRemoteJobPrivate( AbstractFileSystemSyncWithRemoteJob* parent,
71  AbstractModelFileSystemSynchronizer* synchronizer,
72  const KUrl& url, AbstractModelSynchronizer::ConnectOption option )
73  : AbstractSyncWithRemoteJobPrivate( parent ),
74  mSynchronizer( synchronizer ),
75  mUrl( url ),
76  mOption( option ),
77  mFile( 0 )
78 {}
79 
80 inline AbstractFileSystemSyncWithRemoteJobPrivate::~AbstractFileSystemSyncWithRemoteJobPrivate() {}
81 
82 inline QFile* AbstractFileSystemSyncWithRemoteJobPrivate::file() const { return mFile; }
83 // TODO: setup a notification system
84 inline AbstractModelFileSystemSynchronizer* AbstractFileSystemSyncWithRemoteJobPrivate::synchronizer() const
85 {
86  return mSynchronizer;
87 }
88 
89 inline void AbstractFileSystemSyncWithRemoteJobPrivate::start()
90 {
91  Q_Q( AbstractFileSystemSyncWithRemoteJob );
92 
93  QMetaObject::invokeMethod( q, "syncWithRemote", Qt::QueuedConnection );
94 }
95 
96 }
97 
98 #endif
abstractfilesystemsyncwithremotejob.h
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::mOption
const AbstractModelSynchronizer::ConnectOption mOption
Definition: abstractfilesystemsyncwithremotejob_p.h:64
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::mUrl
const KUrl mUrl
Definition: abstractfilesystemsyncwithremotejob_p.h:63
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::AbstractFileSystemSyncWithRemoteJobPrivate
AbstractFileSystemSyncWithRemoteJobPrivate(AbstractFileSystemSyncWithRemoteJob *parent, AbstractModelFileSystemSynchronizer *synchronizer, const KUrl &url, AbstractModelSynchronizer::ConnectOption option)
Definition: abstractfilesystemsyncwithremotejob_p.h:70
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::start
void start()
Definition: abstractfilesystemsyncwithremotejob_p.h:89
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::synchronizer
AbstractModelFileSystemSynchronizer * synchronizer() const
Definition: abstractfilesystemsyncwithremotejob_p.h:84
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::mFile
QFile * mFile
Definition: abstractfilesystemsyncwithremotejob_p.h:65
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::mSynchronizer
AbstractModelFileSystemSynchronizer *const mSynchronizer
Definition: abstractfilesystemsyncwithremotejob_p.h:62
Kasten2::AbstractFileSystemSyncWithRemoteJob
Definition: abstractfilesystemsyncwithremotejob.h:42
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::mWorkFilePath
QString mWorkFilePath
Definition: abstractfilesystemsyncwithremotejob_p.h:66
abstractsyncwithremotejob_p.h
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::file
QFile * file() const
Definition: abstractfilesystemsyncwithremotejob_p.h:82
Kasten2::AbstractSyncWithRemoteJobPrivate
Definition: abstractsyncwithremotejob_p.h:32
Kasten2::AbstractModelSynchronizer::ConnectOption
ConnectOption
Definition: abstractmodelsynchronizer.h:66
KASTENCORE_EXPORT
#define KASTENCORE_EXPORT
Definition: kastencore_export.h:36
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate::~AbstractFileSystemSyncWithRemoteJobPrivate
virtual ~AbstractFileSystemSyncWithRemoteJobPrivate()
Definition: abstractfilesystemsyncwithremotejob_p.h:80
Kasten2::AbstractModelFileSystemSynchronizer
Definition: abstractmodelfilesystemsynchronizer.h:38
Kasten2::AbstractFileSystemSyncWithRemoteJobPrivate
Definition: abstractfilesystemsyncwithremotejob_p.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:06 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