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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • cloudsync
OwncloudSyncBackend.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2013 Utku Aydın <utkuaydin34@gmail.com>
9 //
10 
11 #ifndef OWNCLOUDSYNCBACKEND_H
12 #define OWNCLOUDSYNCBACKEND_H
13 
14 #include "CloudRouteModel.h"
15 #include "GeoDataDocument.h"
16 
17 #include <QObject>
18 #include <QDir>
19 #include <QUrl>
20 #include <QVector>
21 #include <QNetworkReply>
22 
23 namespace Marble {
24 
25 class CloudSyncManager;
26 
27 class OwncloudSyncBackend : public QObject
28 {
29  Q_OBJECT
30 
31 public:
32  explicit OwncloudSyncBackend( CloudSyncManager* cloudSyncManager );
33  ~OwncloudSyncBackend();
34 
40  QUrl endpointUrl( const QString &endpoint ) const;
41 
48  QUrl endpointUrl( const QString &endpoint, const QString &parameter ) const;
49 
55  void removeFromCache( const QDir &cacheDir, const QString &timestamp );
56 
57  void uploadRoute( const QString &timestamp );
58  void downloadRouteList();
59  void downloadRoute( const QString &timestamp );
60  void deleteRoute( const QString &timestamp );
61  QPixmap createPreview( const QString &timestamp ) const;
62  QString routeName( const QString &timestamp ) const;
63 
64 public Q_SLOTS:
65  void cancelUpload();
66 
67 private slots:
68  void checkAuthReply();
69  void checkAuthError(QNetworkReply::NetworkError error);
70  void prepareRouteList();
71  void saveDownloadedRoute();
72  void validateSettings();
73 
74 signals:
75  void routeListDownloaded( const QVector<RouteItem> &routeList );
76  void routeDownloaded();
77  void routeDeleted();
78  void routeUploadProgress( qint64 sent, qint64 total );
79  void routeDownloadProgress( qint64 received, qint64 total );
80  void routeListDownloadProgress( qint64 received, qint64 total );
81  void removedFromCache( const QString &timestamp );
82 
83 private:
84  class Private;
85  Private *d;
86 };
87 
88 }
89 
90 #endif // OWNCLOUDSYNCBACKEND_H
GeoDataDocument.h
Marble::OwncloudSyncBackend
Definition: OwncloudSyncBackend.h:27
Marble::OwncloudSyncBackend::uploadRoute
void uploadRoute(const QString &timestamp)
Definition: OwncloudSyncBackend.cpp:100
Marble::OwncloudSyncBackend::routeUploadProgress
void routeUploadProgress(qint64 sent, qint64 total)
Marble::OwncloudSyncBackend::removedFromCache
void removedFromCache(const QString &timestamp)
Marble::OwncloudSyncBackend::deleteRoute
void deleteRoute(const QString &timestamp)
Definition: OwncloudSyncBackend.cpp:224
Marble::OwncloudSyncBackend::routeDownloaded
void routeDownloaded()
CloudRouteModel.h
Marble::OwncloudSyncBackend::routeDownloadProgress
void routeDownloadProgress(qint64 received, qint64 total)
Marble::OwncloudSyncBackend::OwncloudSyncBackend
OwncloudSyncBackend(CloudSyncManager *cloudSyncManager)
Definition: OwncloudSyncBackend.cpp:89
QObject
Marble::OwncloudSyncBackend::endpointUrl
QUrl endpointUrl(const QString &endpoint) const
Generates an endpoint URL by appending endpoint name to API URL.
Definition: OwncloudSyncBackend.cpp:423
Marble::OwncloudSyncBackend::cancelUpload
void cancelUpload()
Definition: OwncloudSyncBackend.cpp:335
QString
QPixmap
Marble::OwncloudSyncBackend::routeDeleted
void routeDeleted()
Marble::OwncloudSyncBackend::downloadRouteList
void downloadRouteList()
Definition: OwncloudSyncBackend.cpp:208
QUrl
QDir
Marble::OwncloudSyncBackend::downloadRoute
void downloadRoute(const QString &timestamp)
Definition: OwncloudSyncBackend.cpp:216
QVector
Marble::OwncloudSyncBackend::routeName
QString routeName(const QString &timestamp) const
Definition: OwncloudSyncBackend.cpp:258
Marble::OwncloudSyncBackend::routeListDownloaded
void routeListDownloaded(const QVector< RouteItem > &routeList)
Marble::OwncloudSyncBackend::removeFromCache
void removeFromCache(const QDir &cacheDir, const QString &timestamp)
Removes route with given timestamp from cache.
Definition: OwncloudSyncBackend.cpp:435
Marble::CloudSyncManager
Definition: CloudSyncManager.h:24
Marble::OwncloudSyncBackend::routeListDownloadProgress
void routeListDownloadProgress(qint64 received, qint64 total)
Marble::OwncloudSyncBackend::createPreview
QPixmap createPreview(const QString &timestamp) const
Definition: OwncloudSyncBackend.cpp:232
Marble::OwncloudSyncBackend::~OwncloudSyncBackend
~OwncloudSyncBackend()
Definition: OwncloudSyncBackend.cpp:95
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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