Structure developer documentation

- rename target "doc-dev"
- group into modules
- move to doc/dev
This commit is contained in:
Daniel Molkentin 2015-06-26 17:07:47 +02:00
parent 7757886ebc
commit 0735aa1fbd
98 changed files with 566 additions and 127 deletions

View File

@ -194,7 +194,7 @@ add_subdirectory(src)
if(NOT BUILD_LIBRARIES_ONLY)
add_subdirectory(shell_integration)
add_subdirectory(doc)
add_subdirectory(dev-doc)
add_subdirectory(doc/dev)
add_subdirectory(admin)
endif(NOT BUILD_LIBRARIES_ONLY)

View File

@ -2,7 +2,7 @@
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(dev-doc
add_custom_target(doc-dev
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM

View File

@ -398,7 +398,7 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.
EXTRACT_ALL = YES
EXTRACT_ALL = NO
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
# be included in the documentation.
@ -457,7 +457,7 @@ HIDE_UNDOC_MEMBERS = NO
# no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
HIDE_UNDOC_CLASSES = YES
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# (class|struct|union) declarations. If set to NO these declarations will be
@ -553,7 +553,7 @@ SORT_MEMBERS_CTORS_1ST = NO
# appear in their defined order.
# The default value is: NO.
SORT_GROUP_NAMES = NO
SORT_GROUP_NAMES = YES
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
# fully-qualified names, including namespaces. If set to NO, the class list will
@ -1899,7 +1899,7 @@ ENABLE_PREPROCESSING = YES
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
MACRO_EXPANSION = NO
MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
@ -1907,7 +1907,7 @@ MACRO_EXPANSION = NO
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
EXPAND_ONLY_PREDEF = NO
EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES the includes files in the
# INCLUDE_PATH will be searched if a #include is found.
@ -1939,7 +1939,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED =
PREDEFINED = OWNCLOUDSYNC_EXPORT
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The

View File

@ -18,7 +18,10 @@
#include <QObject>
/*!
* \brief Helper class for command line client
* \ingroup cmd
*/
class Cmd : public QObject {
Q_OBJECT
public:

4
src/cmd/cmd.md Normal file
View File

@ -0,0 +1,4 @@
\defgroup cmd The command line client
The command line client
=======================

View File

@ -20,6 +20,10 @@
namespace OCC {
/*!
* \brief Parser for netrc files
* \ingroup cmd
*/
class NetrcParser
{
public:

View File

@ -15,6 +15,8 @@
#include "account.h"
#include "simplesslerrorhandler.h"
namespace OCC {
bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, OCC::AccountPtr account)
{
(void) account;
@ -30,3 +32,5 @@ bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConf
}
return true;
}
}

View File

@ -18,9 +18,17 @@
class QSslError;
class QSslCertificate;
namespace OCC {
/*!
* \brief The SimpleSslErrorHandler class
* \ingroup cmd
*/
class SimpleSslErrorHandler : public OCC::AbstractSslErrorHandler {
public:
bool handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, OCC::AccountPtr) Q_DECL_OVERRIDE;
};
}
#endif // SIMPLESSLERRORHANDLER_H

View File

@ -20,6 +20,10 @@ namespace OCC {
typedef QSharedPointer<AccountState> AccountStatePtr;
/*!
\brief The AccountManager class
\ingroup gui
*/
class AccountManager : public QObject {
Q_OBJECT
public:

View File

@ -18,6 +18,10 @@
namespace OCC {
/*!
* \brief The AccountSettings class
* \ingroup gui
*/
class AccountMigrator {
public:

View File

@ -40,6 +40,10 @@ class Account;
class AccountState;
class FolderStatusModel;
/*!
* \brief The AccountSettings class
* \ingroup gui
*/
class AccountSettings : public QWidget
{
Q_OBJECT

View File

@ -30,8 +30,9 @@ class AccountState;
class Account;
class AbstractCredentials;
/**
* @brief Extra info about an ownCloud server account.
/*!
* \brief Extra info about an ownCloud server account.
* \ingroup gui
*/
class AccountState : public QObject {
Q_OBJECT
@ -91,8 +92,6 @@ public:
/** Returns a new settings object for this account, already in the right groups. */
std::unique_ptr<QSettings> settings();
private:
void setState(State state);

View File

@ -24,6 +24,10 @@ namespace Ui {
class AddCertificateDialog;
}
/*!
* \brief The AddCertificateDialog class
* \ingroup gui
*/
class AddCertificateDialog : public QDialog
{
Q_OBJECT

View File

@ -43,6 +43,10 @@ class Theme;
class Folder;
class SslErrorDialog;
/*!
* \brief The Application class
* \ingroup gui
*/
class Application : public SharedTools::QtSingleApplication
{
Q_OBJECT

View File

@ -20,7 +20,10 @@ class QLineEdit;
namespace OCC {
/** @brief Authenticate a user for a specific credential given his credentials */
/*!
* \brief Authenticate a user for a specific credential given his credentials
* \ingroup gui
*/
class AuthenticationDialog : public QDialog {
Q_OBJECT
public:

View File

@ -14,7 +14,10 @@
namespace OCC {
namespace Mac {
/** CocoaInitializer provides an AutoRelease Pool via RIIA for use in main() */
/*!
* \brief CocoaInitializer provides an AutoRelease Pool via RIIA for use in main()
* \ingroup gui
*/
class CocoaInitializer {
public:
CocoaInitializer();

View File

@ -22,6 +22,11 @@ namespace OCC
{
class AbstractCredentials;
/*!
* \brief The HttpCredentialsGui namespace
* \ingroup gui
*/
namespace CredentialsFactory
{

View File

@ -19,6 +19,10 @@
namespace OCC
{
/*!
* \brief The HttpCredentialsGui class
* \ingroup gui
*/
class HttpCredentialsGui : public HttpCredentials {
Q_OBJECT
public:

View File

@ -26,6 +26,10 @@ namespace OCC
class Account;
class ShibbolethCredentials;
/*!
* \brief The ShibbolethRefresher class
* \ingroup gui
*/
class ShibbolethRefresher : public QObject
{
Q_OBJECT

View File

@ -19,9 +19,10 @@
namespace OCC
{
/**
* @brief Fetch the user name of the shibboleth connection
*/
/*!
* \brief Fetch the user name of the shibboleth connection
* \ingroup gui
*/
class ShibbolethUserJob : public JsonApiJob {
Q_OBJECT
public:

View File

@ -28,6 +28,10 @@ namespace OCC
class ShibbolethCookieJar;
/*!
* \brief The ShibbolethWebView class
* \ingroup gui
*/
class ShibbolethWebView : public QWebView
{
Q_OBJECT

View File

@ -33,6 +33,10 @@ namespace OCC
class ShibbolethWebView;
/*!
* \brief The ShibbolethCredentials class
* \ingroup gui
*/
class ShibbolethCredentials : public AbstractCredentials
{
Q_OBJECT

View File

@ -44,6 +44,10 @@ namespace OCC {
class SyncEngine;
class AccountState;
/*!
* \brief The FolderDefinition class
* \ingroup gui
*/
class FolderDefinition
{
public:
@ -68,6 +72,10 @@ public:
FolderDefinition* folder);
};
/*!
* \brief The Folder class
* \ingroup gui
*/
class Folder : public QObject
{
Q_OBJECT

View File

@ -33,6 +33,10 @@ class Application;
class SyncResult;
class SocketApi;
/*!
* \brief The FolderMan class
* \ingroup gui
*/
class FolderMan : public QObject
{
Q_OBJECT

View File

@ -18,7 +18,10 @@
namespace OCC {
/*!
* \brief The FolderStatusDelegate class
* \ingroup gui
*/
class FolderStatusDelegate : public QStyledItemDelegate
{
Q_OBJECT

View File

@ -26,6 +26,10 @@ namespace OCC {
class Folder;
class ProgressInfo;
/*!
* \brief The FolderStatusModel class
* \ingroup gui
*/
class FolderStatusModel : public QAbstractItemModel
{
Q_OBJECT

View File

@ -31,7 +31,9 @@ namespace OCC {
class FolderWatcherPrivate;
/*
/*!
* \brief Montiors a directory recursively for changes
*
* Folder Watcher monitors a directory and its sub directories
* for changes in the local file system. Changes are signalled
* through the pathChanged() signal.
@ -40,6 +42,8 @@ class FolderWatcherPrivate;
* does not automatically adds them to the list of monitored
* dirs. That is the responsibility of the user of this class to
* call addPath() with the new dir.
*
* \ingroup gui
*/
class FolderWatcher : public QObject

View File

@ -24,6 +24,11 @@
namespace OCC
{
/*!
* \brief Linux (inotify) API implementation of FolderWatcher
* \ingroup gui
*/
class FolderWatcherPrivate : public QObject
{
Q_OBJECT

View File

@ -23,6 +23,10 @@
namespace OCC
{
/*!
* \brief Mac OS X API implementation of FolderWatcher
* \ingroup gui
*/
class FolderWatcherPrivate
{
public:

View File

@ -22,6 +22,10 @@ namespace OCC {
class FolderWatcher;
/*!
* \brief Qt API implementation of FolderWatcher
* \ingroup gui
*/
class FolderWatcherPrivate : public QObject {
Q_OBJECT
public:

View File

@ -21,8 +21,10 @@ namespace OCC {
class FolderWatcher;
// watcher thread
/*!
* \brief The WatcherThread class
* \ingroup gui
*/
class WatcherThread : public QThread {
Q_OBJECT
public:
@ -44,6 +46,10 @@ private:
HANDLE _handle;
};
/*!
* \brief Windows implementation of FolderWatcher
* \ingroup gui
*/
class FolderWatcherPrivate : public QObject {
Q_OBJECT
public:

View File

@ -31,14 +31,19 @@ class SelectiveSyncTreeView;
class ownCloudInfo;
/*!
* \brief The FormatWarningsWizardPage class
* \ingroup gui
*/
class FormatWarningsWizardPage : public QWizardPage {
Q_OBJECT
protected:
QString formatWarnings(const QStringList &warnings) const;
};
/**
* page to ask for the local source folder
/*!
* \brief Page to ask for the local source folder
* \ingroup gui
*/
class FolderWizardLocalPath : public FormatWarningsWizardPage
{
@ -61,8 +66,9 @@ private:
};
/**
* page to ask for the target folder
/*!
* \brief page to ask for the target folder
* \ingroup gui
*/
class FolderWizardRemotePath : public FormatWarningsWizardPage
@ -100,7 +106,10 @@ private:
QTimer _lscolTimer;
};
/*!
* \brief The FolderWizardSelectiveSync class
* \ingroup gui
*/
class FolderWizardSelectiveSync : public QWizardPage
{
Q_OBJECT
@ -118,9 +127,9 @@ private:
};
/**
*
/*!
* \brief The FolderWizard class
* \ingroup gui
*/
class FolderWizard : public QWizard
{

View File

@ -24,6 +24,10 @@ namespace Ui {
class GeneralSettings;
}
/*!
* \brief The GeneralSettings class
* \ingroup gui
*/
class GeneralSettings : public QWidget
{
Q_OBJECT

5
src/gui/gui.md Normal file
View File

@ -0,0 +1,5 @@
The GUI Client
==============
\defgroup gui The GUI client

View File

@ -24,6 +24,10 @@ namespace Ui {
class IgnoreListEditor;
}
/*!
* \brief The IgnoreListEditor class
* \ingroup gui
*/
class IgnoreListEditor : public QDialog
{
Q_OBJECT

View File

@ -28,6 +28,10 @@
namespace OCC {
/*!
* \brief The LogWidget class
* \ingroup gui
*/
class LogWidget : public QPlainTextEdit
{
Q_OBJECT
@ -38,6 +42,10 @@ signals:
};
/*!
* \brief The LogBrowser class
* \ingroup gui
*/
class LogBrowser : public QDialog
{
Q_OBJECT

View File

@ -23,6 +23,10 @@ namespace Ui {
class NetworkSettings;
}
/*!
* \brief The NetworkSettings class
* \ingroup gui
*/
class NetworkSettings : public QWidget
{
Q_OBJECT

View File

@ -15,6 +15,9 @@
#include <QString>
namespace OCC {
/** Open the file manager with the specified file pre-selected */
/*!
* \brief Open the file manager with the specified file pre-selected
* \ingroup gui
*/
void showInFileManager(const QString &localPath);
}

View File

@ -33,6 +33,10 @@ class SettingsDialogMac;
class Application;
class LogBrowser;
/*!
* \brief The ownCloudGui class
* \ingroup gui
*/
class ownCloudGui : public QObject
{
Q_OBJECT

View File

@ -33,6 +33,10 @@ class AccountState;
class OwncloudWizard;
/*!
* \brief The DetermineAuthTypeJob class
* \ingroup gui
*/
class DetermineAuthTypeJob : public AbstractNetworkJob {
Q_OBJECT
public:
@ -46,7 +50,10 @@ private:
int _redirects;
};
/*!
* \brief The OwncloudSetupWizard class
* \ingroup gui
*/
class OwncloudSetupWizard : public QObject
{
Q_OBJECT

View File

@ -32,6 +32,10 @@ namespace Ui {
}
class Application;
/*!
* \brief The ProtocolWidget class
* \ingroup gui
*/
class ProtocolWidget : public QWidget
{
Q_OBJECT

View File

@ -24,6 +24,10 @@ namespace OCC {
class AccountState;
/*!
* \brief The QuotaInfo class
* \ingroup gui
*/
class QuotaInfo : public QObject {
Q_OBJECT
public:

View File

@ -25,6 +25,10 @@ namespace OCC {
class Folder;
/*!
* \brief The SelectiveSyncTreeView class
* \ingroup gui
*/
class SelectiveSyncTreeView : public QTreeWidget {
Q_OBJECT
public:
@ -57,6 +61,10 @@ private:
QLabel *_loading;
};
/*!
* \brief The SelectiveSyncDialog class
* \ingroup gui
*/
class SelectiveSyncDialog : public QDialog {
Q_OBJECT
public:

View File

@ -34,6 +34,10 @@ class Application;
class FolderMan;
class ownCloudGui;
/*!
* \brief The SettingsDialog class
* \ingroup gui
*/
class SettingsDialog : public QDialog
{
Q_OBJECT

View File

@ -31,6 +31,10 @@ class ownCloudGui;
class Folder;
class AccountState;
/*!
* \brief The SettingsDialogMac class
* \ingroup gui
*/
class SettingsDialogMac : public MacPreferencesWindow
{
Q_OBJECT

View File

@ -23,6 +23,10 @@
namespace OCC {
/*!
* \brief The OcsShareJob class
* \ingroup gui
*/
class OcsShareJob : public AbstractNetworkJob {
Q_OBJECT
public:
@ -53,6 +57,10 @@ class AbstractCredentials;
class QuotaInfo;
class SyncResult;
/*!
* \brief The ShareDialog class
* \ingroup gui
*/
class ShareDialog : public QDialog
{
Q_OBJECT

View File

@ -40,6 +40,10 @@ namespace OCC {
class SyncFileStatus;
class Folder;
/*!
* \brief The SocketApi class
* \ingroup gui
*/
class SocketApi : public QObject
{
Q_OBJECT

View File

@ -26,6 +26,10 @@ namespace OCC {
class AccountState;
/*!
* \brief The SslButton class
* \ingroup gui
*/
class SslButton : public QToolButton
{
Q_OBJECT

View File

@ -31,11 +31,19 @@ namespace Ui {
class SslErrorDialog;
}
/*!
* \brief The SslDialogErrorHandler class
* \ingroup gui
*/
class SslDialogErrorHandler : public AbstractSslErrorHandler {
public:
bool handleErrors(QList<QSslError> errors, const QSslConfiguration &conf, QList<QSslCertificate> *certs, AccountPtr) Q_DECL_OVERRIDE;
};
/*!
* \brief The SslErrorDialog class
* \ingroup gui
*/
class SslErrorDialog : public QDialog
{
Q_OBJECT

View File

@ -24,6 +24,10 @@
namespace OCC {
class SyncFileItem;
/*!
* \brief The SyncRunFileLog class
* \ingroup gui
*/
class SyncRunFileLog
{
public:

View File

@ -26,6 +26,10 @@ bool canOsXSendUserNotification();
void sendOsXUserNotification(const QString &title, const QString &message);
#endif
/*!
* \brief The Systray class
* \ingroup gui
*/
class Systray : public QSystemTrayIcon
{
Q_OBJECT

View File

@ -28,7 +28,10 @@ class QTimer;
namespace OCC {
/** @short Class that uses an ownCloud propritary XML format to fetch update information */
/*!
* \brief Class that uses an ownCloud propritary XML format to fetch update information
* \ingroup gui
*/
class OCUpdater : public QObject, public Updater
{
Q_OBJECT
@ -72,7 +75,10 @@ private:
UpdateInfo _updateInfo;
};
/** Windows Updater Using NSIS */
/*!
* \brief Windows Updater Using NSIS
* \ingroup gui
*/
class NSISUpdater : public OCUpdater {
Q_OBJECT
public:
@ -93,8 +99,13 @@ private:
};
/** Passive updater: Only implements notification for use in settings.
Does not do popups */
/*!
* @brief Updater that only implements notification for use in settings
*
* The implementation does how show popups
*
* \ingroup gui
*/
class PassiveUpdateNotifier : public OCUpdater {
Q_OBJECT
public:

View File

@ -21,6 +21,10 @@ namespace OCC
class AbstractCredentials;
/*!
* \brief The AbstractCredentialsWizardPage class
* \ingroup gui
*/
class AbstractCredentialsWizardPage : public QWizardPage
{
public:

View File

@ -25,6 +25,10 @@ class QProgressIndicator;
namespace OCC {
/*!
* \brief The OwncloudAdvancedSetupPage class
* \ingroup gui
*/
class OwncloudAdvancedSetupPage: public QWizardPage
{
Q_OBJECT

View File

@ -16,6 +16,8 @@
#include "utility.h"
#include <QUrl>
namespace OCC {
OwncloudConnectionMethodDialog::OwncloudConnectionMethodDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::OwncloudConnectionMethodDialog)
@ -60,3 +62,5 @@ OwncloudConnectionMethodDialog::~OwncloudConnectionMethodDialog()
{
delete ui;
}
}

View File

@ -19,10 +19,16 @@
#include "ui_owncloudconnectionmethoddialog.h"
namespace OCC {
namespace Ui {
class OwncloudConnectionMethodDialog;
}
/*!
* \brief The OwncloudConnectionMethodDialog class
* \ingroup gui
*/
class OwncloudConnectionMethodDialog : public QDialog
{
Q_OBJECT
@ -48,4 +54,6 @@ private:
Ui::OwncloudConnectionMethodDialog *ui;
};
}
#endif // OWNCLOUDCONNECTIONMETHODDIALOG_H

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OwncloudConnectionMethodDialog</class>
<widget class="QDialog" name="OwncloudConnectionMethodDialog">
<class>OCC::OwncloudConnectionMethodDialog</class>
<widget class="QDialog" name="OCC::OwncloudConnectionMethodDialog">
<property name="geometry">
<rect>
<x>0</x>

View File

@ -25,6 +25,9 @@ class QProgressIndicator;
namespace OCC {
/*!
* \brief The OwncloudHttpCredsPage class
*/
class OwncloudHttpCredsPage : public AbstractCredentialsWizardPage
{
Q_OBJECT

View File

@ -32,6 +32,10 @@ class QProgressIndicator;
namespace OCC {
/*!
* \brief The OwncloudSetupPage class
* \ingroup gui
*/
class OwncloudSetupPage: public QWizardPage
{
Q_OBJECT

View File

@ -27,6 +27,10 @@ namespace OCC {
class ShibbolethWebView;
/*!
* \brief The OwncloudShibbolethCredsPage class
* \ingroup gui
*/
class OwncloudShibbolethCredsPage : public AbstractCredentialsWizardPage
{
Q_OBJECT

View File

@ -31,7 +31,11 @@ class OwncloudWizardResultPage;
class AbstractCredentials;
class AbstractCredentialsWizardPage;
class OwncloudWizard: public QWizard
/*!
* \brief The OwncloudWizard class
* \ingroup gui
*/
class OwncloudWizard : public QWizard
{
Q_OBJECT
public:

View File

@ -22,6 +22,10 @@
namespace OCC {
/*!
* \brief The OwncloudWizardResultPage class
* \ingroup gui
*/
class OwncloudWizardResultPage : public QWizardPage
{
Q_OBJECT

View File

@ -32,7 +32,8 @@ namespace OCC {
class AbstractSslErrorHandler;
/**
* @brief The AbstractNetworkJob class
* \brief The AbstractNetworkJob class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT AbstractNetworkJob : public QObject {
Q_OBJECT

View File

@ -23,6 +23,10 @@ class QUrl;
namespace OCC
{
/*!
* \brief The AccessManager class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT AccessManager : public QNetworkAccessManager
{
Q_OBJECT

View File

@ -32,6 +32,7 @@
namespace OCC {
Account::Account(QObject *parent)
: QObject(parent)
, _am(0)

View File

@ -41,15 +41,20 @@ class QuotaInfo;
class AccessManager;
/* Reimplement this to handle SSL errors */
/*!
* \brief Reimplement this to handle SSL errors from libsync
* \ingroup libsync
*/
class AbstractSslErrorHandler {
public:
virtual ~AbstractSslErrorHandler() {}
virtual bool handleErrors(QList<QSslError>, const QSslConfiguration &conf, QList<QSslCertificate>*, AccountPtr) = 0;
};
/**
* @brief This class represents an account on an ownCloud Server
/*!
* \brief The Account class represents an account on an ownCloud Server
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT Account : public QObject {
Q_OBJECT

View File

@ -26,6 +26,10 @@ class UploadDevice;
class GETFileJob;
class OwncloudPropagator;
/*!
* \brief The BandwidthManager class
* \ingroup libsync
*/
class BandwidthManager : public QObject {
Q_OBJECT
public:

View File

@ -26,6 +26,10 @@ namespace OCC {
class ConfigFile;
/*!
* \brief The ClientProxy class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT ClientProxy : public QObject
{
Q_OBJECT

View File

@ -27,6 +27,10 @@ namespace OCC {
class AbstractCredentials;
/*!
* \brief The ConfigFile class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT ConfigFile
{
public:

View File

@ -23,7 +23,7 @@
namespace OCC {
/**
/*!
* This is a job-like class to check that the server is up and that we are connected.
* There is two entry point: checkServerAndAuth and checkAuthentication
* checkAutentication is the quick version that only do the propfind
@ -34,7 +34,7 @@ namespace OCC {
*
* Here follows the state machine
\code{.unparsed}
*---> checkServerAndAuth (check status.php)
Will asynchronously check for system proxy (if using system proxy)
And then invoke slotCheckServerAndAuth
@ -62,6 +62,7 @@ namespace OCC {
JsonApiJob
|
+-> slotCapabilitiesRecieved --> X
\endcode
*/
class OWNCLOUDSYNC_EXPORT ConnectionValidator : public QObject
{

View File

@ -20,6 +20,10 @@
namespace OCC {
/*!
* \brief The CookieJar class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT CookieJar : public QNetworkCookieJar
{
Q_OBJECT

View File

@ -34,6 +34,10 @@ class Account;
* if the files are new, or changed.
*/
/*!
* \brief The FileStatPointer class
* \ingroup libsync
*/
class FileStatPointer {
public:
FileStatPointer(csync_vio_file_stat_t *stat)
@ -66,7 +70,13 @@ struct DiscoveryDirectoryResult {
DiscoveryDirectoryResult() : code(EIO), listIndex(0) { }
};
// Run in the main thread, reporting to the DiscoveryJobMainThread object
/*!
* \brief The DiscoverySingleDirectoryJob class
*
* Run in the main thread, reporting to the DiscoveryJobMainThread object
*
* \ingroup libsync
*/
class DiscoverySingleDirectoryJob : public QObject {
Q_OBJECT
public:
@ -129,9 +139,13 @@ public:
void setupHooks(DiscoveryJob* discoveryJob, const QString &pathPrefix);
};
// Lives in the other thread
// Deletes itself in start()
/*!
* \brief The DiscoveryJob class
*
* Lives in the other thread, deletes itself in !start()
*
* \ingroup libsync
*/
class DiscoveryJob : public QObject {
Q_OBJECT
friend class DiscoveryMainThread;

View File

@ -26,20 +26,29 @@ class QFileInfo;
namespace OCC {
/**
* This file contains file system helper.
/*!
* \addtogroup libsync
* @{
*/
/**
* \brief This file contains file system helper
*/
namespace FileSystem {
/** compare two files with given filename and return true if they have the same content */
/*!
* \brief compare two files with given filename and return true if they have the same content
*/
bool fileEquals(const QString &fn1, const QString &fn2);
/** Mark the file as hidden (only has effects on windows) */
/*!
* \brief Mark the file as hidden (only has effects on windows)
*/
void OWNCLOUDSYNC_EXPORT setFileHidden(const QString& filename, bool hidden);
/** Get the mtime for a filepath.
/*!
* \brief Get the mtime for a filepath
*
* Use this over QFileInfo::lastModified() to avoid timezone related bugs. See
* owncloud/core#9781 for details.
@ -48,22 +57,24 @@ time_t OWNCLOUDSYNC_EXPORT getModTime(const QString& filename);
bool setModTime(const QString &filename, time_t modTime);
/** Get the size for a file.
/*!
* \brief Get the size for a file
*
* Use this over QFileInfo::size() to avoid bugs with lnk files on Windows.
* See https://bugreports.qt.io/browse/QTBUG-24831.
*/
qint64 OWNCLOUDSYNC_EXPORT getSize(const QString& filename);
/** Checks whether a file exists.
/*!
* \brief Checks whether a file exists.
*
* Use this over QFileInfo::exists() and QFile::exists() to avoid bugs with lnk
* files, see above.
*/
bool OWNCLOUDSYNC_EXPORT fileExists(const QString& filename);
/**
* Rename the file \a originFileName to \a destinationFileName.
/*!
* \brief Rename the file \a originFileName to \a destinationFileName.
*
* It behaves as QFile::rename() but handles .lnk files correctly on Windows.
*/
@ -71,26 +82,32 @@ bool OWNCLOUDSYNC_EXPORT rename(const QString& originFileName,
const QString& destinationFileName,
QString* errorString = NULL);
/**
* Returns true if the file's mtime or size are not what is expected.
/*!
* \brief Check if \a fileName chas changed given previous size and mtime
*
* Nonexisting files are covered through mtime: they have an mtime of -1.
*
* \return true if the file's mtime or size are not what is expected.
*/
bool fileChanged(const QString& fileName,
qint64 previousSize,
time_t previousMtime);
/**
* Like !fileChanged() but with verbose logging if the file *did* change.
/*!
* \brief Like !fileChanged() but with verbose logging if the file *did* change.
*/
bool verifyFileUnchanged(const QString& fileName,
qint64 previousSize,
time_t previousMtime);
/**
/*!
* \brief renames a file, overriding the target if it exists
*
* Rename the file \a originFileName to \a destinationFileName, and
* overwrite the destination if it already exists - as long as the
* destination file has the expected \a destinationSize and
* \a destinationMtime.
*
* If the destination file does not exist, the given size and mtime are
* ignored.
*/
@ -100,7 +117,7 @@ bool renameReplace(const QString &originFileName,
time_t destinationMtime,
QString *errorString);
/**
/*!
* Rename the file \a originFileName to \a destinationFileName, and
* overwrite the destination if it already exists - without extra checks.
*/
@ -108,7 +125,7 @@ bool uncheckedRenameReplace(const QString &originFileName,
const QString &destinationFileName,
QString *errorString);
/**
/*!
* Replacement for QFile::open(ReadOnly) followed by a seek().
* This version sets a more permissive sharing mode on Windows.
*
@ -118,7 +135,7 @@ bool uncheckedRenameReplace(const QString &originFileName,
bool openAndSeekFileSharedRead(QFile* file, QString* error, qint64 seek);
#ifdef Q_OS_WIN
/**
/*!
* Returns the file system used at the given path.
*/
QString fileSystemForPath(const QString & path);
@ -130,4 +147,8 @@ QByteArray OWNCLOUDSYNC_EXPORT calcSha1( const QString& fileName );
QByteArray OWNCLOUDSYNC_EXPORT calcAdler32( const QString& fileName );
#endif
}}
}
/*! @} */
}

5
src/libsync/libsync.md Normal file
View File

@ -0,0 +1,5 @@
\defgroup libsync The sync library
The sync library
================

View File

@ -37,6 +37,10 @@ struct Log{
QString message;
};
/*!
* \brief The Logger class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT Logger : public QObject
{
Q_OBJECT

View File

@ -22,8 +22,9 @@ class QUrl;
namespace OCC {
/**
* @brief The EntityExistsJob class
/*!
* \brief The EntityExistsJob class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT EntityExistsJob : public AbstractNetworkJob {
Q_OBJECT
@ -38,8 +39,9 @@ private slots:
virtual bool finished() Q_DECL_OVERRIDE;
};
/**
* @brief The LsColJob class
/*!
* \brief The LsColJob class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT LsColXMLParser : public QObject {
Q_OBJECT
@ -87,13 +89,15 @@ private:
QList<QByteArray> _properties;
};
/**
* @brief The PropfindJob class
/*!
* \brief The PropfindJob class
*
* Setting the desired properties with setProperties() is mandatory.
*
* Note that this job is only for querying one item.
* There is also the LsColJob which can be used to list collections
*
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT PropfindJob : public AbstractNetworkJob {
Q_OBJECT
@ -124,7 +128,8 @@ private:
};
/**
* @brief The MkColJob class
* \brief The MkColJob class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT MkColJob : public AbstractNetworkJob {
Q_OBJECT
@ -139,8 +144,9 @@ private slots:
virtual bool finished() Q_DECL_OVERRIDE;
};
/**
* @brief The CheckServerJob class
/*!
* \brief The CheckServerJob class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT CheckServerJob : public AbstractNetworkJob {
Q_OBJECT
@ -166,8 +172,8 @@ private:
};
/**
* @brief The RequestEtagJob class
/*!
* \brief The RequestEtagJob class
*/
class OWNCLOUDSYNC_EXPORT RequestEtagJob : public AbstractNetworkJob {
Q_OBJECT
@ -188,11 +194,14 @@ private slots:
* Note! you need to be in the connected state before calling this because of a server bug:
* https://github.com/owncloud/core/issues/12930
*
* To be used like this
* To be used like this:
* \code
* _job = new JsonApiJob(account, QLatin1String("ocs/v1.php/foo/bar"), this);
* connect(job, SIGNAL(jsonRecieved(QVariantMap)), ...)
* The recieved QVariantMap is empty in case of error or otherwise is a map as parsed by QtJson
* \encode
*
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT JsonApiJob : public AbstractNetworkJob {
Q_OBJECT

View File

@ -40,16 +40,14 @@ namespace OCC {
class SyncJournalDb;
class OwncloudPropagator;
/**
* @class PropagatorJob
* @brief the base class of propagator jobs
/*!
* \brief the base class of propagator jobs
*
* This can either be a job, or a container for jobs.
* If it is a composite jobs, it then inherits from PropagateDirectory
*
*
* \ingroup libsync
*/
class PropagatorJob : public QObject {
Q_OBJECT
protected:
@ -158,8 +156,9 @@ public slots:
};
/*
* Propagate a directory, and all its sub entries.
/*!
* \brief Propagate a directory, and all its sub entries.
* \ingroup libsync
*/
class PropagateDirectory : public PropagatorJob {
Q_OBJECT
@ -220,7 +219,10 @@ private slots:
};
// Dummy job that just mark it as completed and ignored.
/*!
* \brief Dummy job that just mark it as completed and ignored
* \ingroup libsync
*/
class PropagateIgnoreJob : public PropagateItemJob {
Q_OBJECT
public:
@ -349,7 +351,11 @@ private:
mutable QMutex _touchedFilesMutex;
};
// Job that wait for all the poll jobs to be completed
/*!
* \brief Job that wait for all the poll jobs to be completed
* \ingroup libsync
*/
class CleanupPollsJob : public QObject {
Q_OBJECT
QVector< SyncJournalDb::PollInfo > _pollInfos;

View File

@ -19,6 +19,10 @@
namespace OCC {
/*!
* \brief The ownCloudTheme class
* \ingroup libsync
*/
class ownCloudTheme : public Theme
{
Q_OBJECT

View File

@ -23,6 +23,10 @@
namespace OCC {
/*!
* \brief The SqlDatabase class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SqlDatabase
{
Q_DISABLE_COPY(SqlDatabase)
@ -48,6 +52,10 @@ private:
};
/*!
* \brief The SqlQuery class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SqlQuery
{
Q_DISABLE_COPY(SqlQuery)

View File

@ -27,6 +27,10 @@
namespace OCC {
/*!
* \brief The ProgressInfo class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT ProgressInfo : public QObject
{
Q_OBJECT

View File

@ -21,6 +21,10 @@
namespace OCC {
/*!
* \brief The GETFileJob class
* \ingroup libsync
*/
class GETFileJob : public AbstractNetworkJob {
Q_OBJECT
QFile* _device;
@ -98,7 +102,10 @@ private slots:
void slotMetaDataChanged();
};
/*!
* \brief The PropagateDownloadFileQNAM class
* \ingroup libsync
*/
class PropagateDownloadFileQNAM : public PropagateItemJob {
Q_OBJECT
public:

View File

@ -18,6 +18,10 @@
namespace OCC {
/*!
* \brief The DeleteJob class
* \ingroup libsync
*/
class DeleteJob : public AbstractNetworkJob {
Q_OBJECT
public:
@ -33,6 +37,10 @@ signals:
void finishedSignal();
};
/*!
* \brief The PropagateRemoteDelete class
* \ingroup libsync
*/
class PropagateRemoteDelete : public PropagateItemJob {
Q_OBJECT
QPointer<DeleteJob> _job;
@ -46,4 +54,4 @@ private slots:
};
}
}

View File

@ -18,6 +18,10 @@
namespace OCC {
/*!
* \brief The PropagateRemoteMkdir class
* \ingroup libsync
*/
class PropagateRemoteMkdir : public PropagateItemJob {
Q_OBJECT
QPointer<AbstractNetworkJob> _job;
@ -34,4 +38,4 @@ private slots:
void success();
};
}
}

View File

@ -18,6 +18,10 @@
namespace OCC {
/*!
* \brief The MoveJob class
* \ingroup libsync
*/
class MoveJob : public AbstractNetworkJob {
Q_OBJECT
const QString _destination;
@ -34,7 +38,10 @@ signals:
void finishedSignal();
};
/*!
* \brief The PropagateRemoteMove class
* \ingroup libsync
*/
class PropagateRemoteMove : public PropagateItemJob {
Q_OBJECT
QPointer<MoveJob> _job;

View File

@ -24,6 +24,10 @@
namespace OCC {
class BandwidthManager;
/*!
* \brief The UploadDevice class
* \ingroup libsync
*/
class UploadDevice : public QIODevice {
Q_OBJECT
public:
@ -74,6 +78,10 @@ protected slots:
void slotJobUploadProgress(qint64 sent, qint64 t);
};
/*!
* \brief The PUTFileJob class
* \ingroup libsync
*/
class PUTFileJob : public AbstractNetworkJob {
Q_OBJECT
@ -115,11 +123,12 @@ private slots:
#endif
};
/**
* This job implements the assynchronous PUT
/*!
* \brief This job implements the assynchronous PUT
*
* If the server replies to a PUT with a OC-Finish-Poll url, we will query this url until the server
* replies with an etag
* https://github.com/owncloud/core/issues/12097
* replies with an etag. https://github.com/owncloud/core/issues/12097
* \ingroup libsync
*/
class PollJob : public AbstractNetworkJob {
Q_OBJECT
@ -145,7 +154,10 @@ signals:
void finishedSignal();
};
/*!
* \brief The PropagateUploadFileQNAM class
* \ingroup libsync
*/
class PropagateUploadFileQNAM : public PropagateItemJob {
Q_OBJECT

View File

@ -38,8 +38,10 @@ struct ScopedPointerHelpers {
};
/*
* Abstract class for neon job. Lives in the neon thread
/*!
* \brief Abstract class for neon job. Lives in the neon thread
* \ingroup libsync
*/
class PropagateNeonJob : public PropagateItemJob {
Q_OBJECT
@ -76,6 +78,10 @@ public:
JobParallelism parallelism() Q_DECL_OVERRIDE { return WaitForFinished; }
};
/*!
* \brief The UpdateMTimeAndETagJob class
* \ingroup libsync
*/
class UpdateMTimeAndETagJob : public PropagateNeonJob {
Q_OBJECT
public:
@ -83,6 +89,10 @@ public:
void start() Q_DECL_OVERRIDE;
};
/*!
* \brief The PropagateUploadFileLegacy class
* \ingroup libsync
*/
class PropagateUploadFileLegacy: public PropagateNeonJob {
Q_OBJECT
public:

View File

@ -34,8 +34,9 @@ static const char checkSumSHA1C[] = "SHA1";
static const char checkSumAdlerC[] = "Adler32";
static const char checkSumAdlerUpperC[] = "ADLER32";
/**
* Declaration of the other propagation jobs
/*!
* \brief Declaration of the other propagation jobs
* \ingroup libsync
*/
class PropagateLocalRemove : public PropagateItemJob {
Q_OBJECT
@ -43,6 +44,11 @@ public:
PropagateLocalRemove (OwncloudPropagator* propagator,const SyncFileItemPtr& item) : PropagateItemJob(propagator, item) {}
void start() Q_DECL_OVERRIDE;
};
/*!
* \brief The PropagateLocalMkdir class
* \ingroup libsync
*/
class PropagateLocalMkdir : public PropagateItemJob {
Q_OBJECT
public:
@ -50,6 +56,11 @@ public:
void start() Q_DECL_OVERRIDE;
};
/*!
* \brief The PropagateLocalRename class
* \ingroup libsync
*/
class PropagateLocalRename : public PropagateItemJob {
Q_OBJECT
public:

View File

@ -46,6 +46,10 @@ class SyncJournalFileRecord;
class SyncJournalDb;
class OwncloudPropagator;
/*!
* \brief The SyncEngine class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SyncEngine : public QObject
{
Q_OBJECT

View File

@ -29,8 +29,13 @@
#define BITFIELD(size) :size
#endif
namespace OCC {
/*!
* \brief The SyncFileItem class
* \ingroup libsync
*/
class SyncFileItem {
public:
enum Direction {

View File

@ -20,6 +20,10 @@
namespace OCC {
/*!
* \brief The SyncFileStatus class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SyncFileStatus
{
public:

View File

@ -26,10 +26,11 @@ namespace OCC {
class SyncJournalFileRecord;
class SyncJournalErrorBlacklistRecord;
/**
* Class that handle the sync database
/*!
* \brief Class that handle the sync database
*
* This class is thread safe. All public function are locking the mutex.
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SyncJournalDb : public QObject
{

View File

@ -23,6 +23,10 @@ namespace OCC {
class SyncFileItem;
/*!
* \brief The SyncJournalFileRecord class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SyncJournalFileRecord
{
public:

View File

@ -25,6 +25,10 @@
namespace OCC
{
/*!
* \brief The SyncResult class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT SyncResult
{
public:

View File

@ -29,6 +29,10 @@ namespace OCC {
class SyncResult;
/*!
* \brief The Theme class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT Theme : public QObject
{
Q_OBJECT

View File

@ -22,6 +22,10 @@
namespace OCC {
/*!
* \brief The TransmissionChecksumValidator class
* \ingroup libsync
*/
class OWNCLOUDSYNC_EXPORT TransmissionChecksumValidator : public QObject
{
Q_OBJECT

View File

@ -24,6 +24,9 @@
namespace OCC {
/** \addtogroup libsync
* @{
*/
namespace Utility
{
OWNCLOUDSYNC_EXPORT void sleep(int sec);
@ -113,7 +116,9 @@ namespace Utility
QDateTime timeOfLap( const QString& lapName ) const;
quint64 durationOfLap( const QString& lapName ) const;
};
}
/** @} */ // \addtogroup
}
#endif // UTILITY_H

View File

@ -1,24 +0,0 @@
#include <execinfo.h>
#include <stdlib.h>
static QString qBacktrace( int levels = -1 )
{
QString s;
void* trace[256];
int n = backtrace(trace, 256);
char** strings = backtrace_symbols (trace, n);
if ( levels != -1 )
n = qMin( n, levels );
s = QString::fromLatin1("[\n");
for (int i = 0; i < n; ++i)
s += QString::number(i) +
QString::fromLatin1(": ") +
QString::fromLatin1(strings[i]) + QString::fromLatin1("\n");
s += QString::fromLatin1("]\n");
free (strings);
return s;
}