• 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
abstractfilesystemconnectjob_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 ABSTRACTFILESYSTEMCONNECTJOB_P_H
24 #define ABSTRACTFILESYSTEMCONNECTJOB_P_H
25 
26 // library
27 #include "abstractfilesystemconnectjob.h"
28 #include <abstractconnectjob_p.h>
29 // KDE
30 #include <KUrl>
31 #include <KTemporaryFile>
32 
33 
34 namespace Kasten2
35 {
36 
37 class KASTENCORE_EXPORT AbstractFileSystemConnectJobPrivate : public AbstractConnectJobPrivate
38 {
39  public:
40  AbstractFileSystemConnectJobPrivate( AbstractFileSystemConnectJob* parent,
41  AbstractModelFileSystemSynchronizer* synchronizer, AbstractDocument* document,
42  const KUrl& url, AbstractModelSynchronizer::ConnectOption option );
43 
44  virtual ~AbstractFileSystemConnectJobPrivate();
45 
46  public: // KJob API
47  void start();
48 
49  public:
50  void complete( bool success );
51 
52  public:
53  AbstractModelFileSystemSynchronizer* synchronizer() const;
54  AbstractDocument* document() const;
55  QFile* file() const;
56 
57  public:
58  void connectWithFile();
59 
60  protected:
61  Q_DECLARE_PUBLIC( AbstractFileSystemConnectJob )
62 
63  protected:
64  AbstractModelFileSystemSynchronizer* const mSynchronizer;
65  AbstractDocument* const mDocument;
66  const KUrl mUrl;
67  const AbstractModelSynchronizer::ConnectOption mOption;
68  QFile* mFile;
69  QString mWorkFilePath;
70 };
71 
72 
73 inline AbstractFileSystemConnectJobPrivate::AbstractFileSystemConnectJobPrivate( AbstractFileSystemConnectJob* parent,
74  AbstractModelFileSystemSynchronizer* synchronizer, AbstractDocument* document,
75  const KUrl& url, AbstractModelSynchronizer::ConnectOption option )
76  : AbstractConnectJobPrivate( parent ),
77  mSynchronizer( synchronizer ),
78  mDocument( document ),
79  mUrl( url ),
80  mOption( option ),
81  mFile( 0 )
82 {}
83 
84 inline AbstractFileSystemConnectJobPrivate::~AbstractFileSystemConnectJobPrivate() {}
85 
86 inline AbstractModelFileSystemSynchronizer* AbstractFileSystemConnectJobPrivate::synchronizer() const
87 {
88  return mSynchronizer;
89 }
90 inline AbstractDocument* AbstractFileSystemConnectJobPrivate::document() const { return mDocument; }
91 inline QFile* AbstractFileSystemConnectJobPrivate::file() const { return mFile; }
92 // TODO: setup a notification system
93 
94 inline void AbstractFileSystemConnectJobPrivate::start()
95 {
96  Q_Q( AbstractFileSystemConnectJob );
97 
98  QMetaObject::invokeMethod( q, "connectWithFile", Qt::QueuedConnection );
99 }
100 
101 }
102 
103 #endif
Kasten2::AbstractFileSystemConnectJobPrivate
Definition: abstractfilesystemconnectjob_p.h:37
Kasten2::AbstractFileSystemConnectJobPrivate::mDocument
AbstractDocument *const mDocument
Definition: abstractfilesystemconnectjob_p.h:65
Kasten2::AbstractFileSystemConnectJobPrivate::mSynchronizer
AbstractModelFileSystemSynchronizer *const mSynchronizer
Definition: abstractfilesystemconnectjob_p.h:64
Kasten2::AbstractFileSystemConnectJobPrivate::mOption
const AbstractModelSynchronizer::ConnectOption mOption
Definition: abstractfilesystemconnectjob_p.h:67
Kasten2::AbstractFileSystemConnectJobPrivate::start
void start()
Definition: abstractfilesystemconnectjob_p.h:94
Kasten2::AbstractFileSystemConnectJobPrivate::mFile
QFile * mFile
Definition: abstractfilesystemconnectjob_p.h:68
Kasten2::AbstractFileSystemConnectJob
Definition: abstractfilesystemconnectjob.h:42
Kasten2::AbstractConnectJobPrivate
Definition: abstractconnectjob_p.h:32
Kasten2::AbstractFileSystemConnectJobPrivate::~AbstractFileSystemConnectJobPrivate
virtual ~AbstractFileSystemConnectJobPrivate()
Definition: abstractfilesystemconnectjob_p.h:84
Kasten2::AbstractFileSystemConnectJobPrivate::document
AbstractDocument * document() const
Definition: abstractfilesystemconnectjob_p.h:90
Kasten2::AbstractFileSystemConnectJobPrivate::AbstractFileSystemConnectJobPrivate
AbstractFileSystemConnectJobPrivate(AbstractFileSystemConnectJob *parent, AbstractModelFileSystemSynchronizer *synchronizer, AbstractDocument *document, const KUrl &url, AbstractModelSynchronizer::ConnectOption option)
Definition: abstractfilesystemconnectjob_p.h:73
Kasten2::AbstractFileSystemConnectJobPrivate::synchronizer
AbstractModelFileSystemSynchronizer * synchronizer() const
Definition: abstractfilesystemconnectjob_p.h:86
Kasten2::AbstractDocument
Definition: abstractdocument.h:43
Kasten2::AbstractModelSynchronizer::ConnectOption
ConnectOption
Definition: abstractmodelsynchronizer.h:66
Kasten2::AbstractFileSystemConnectJobPrivate::file
QFile * file() const
Definition: abstractfilesystemconnectjob_p.h:91
Kasten2::AbstractFileSystemConnectJobPrivate::mUrl
const KUrl mUrl
Definition: abstractfilesystemconnectjob_p.h:66
KASTENCORE_EXPORT
#define KASTENCORE_EXPORT
Definition: kastencore_export.h:36
Kasten2::AbstractModelFileSystemSynchronizer
Definition: abstractmodelfilesystemsynchronizer.h:38
abstractconnectjob_p.h
Kasten2::AbstractFileSystemConnectJobPrivate::mWorkFilePath
QString mWorkFilePath
Definition: abstractfilesystemconnectjob_p.h:69
abstractfilesystemconnectjob.h
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