Improve documentation of connector library
This commit is contained in:
parent
41e0934cd8
commit
f7c3ceaece
|
@ -938,13 +938,12 @@ void SyncthingConnection::handleAdditionalRequestCanceled()
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Internally called to recalculate the overall connection status, eg. after the status of a directory
|
||||
* \brief Internally called to recalculate the overall connection status, e.g. after the status of a directory
|
||||
* changed.
|
||||
* \remarks
|
||||
* - This is achieved by simply setting the status to idle. setStatus() will calculate the specific status.
|
||||
* - If not connected, this method does nothing. This is important, because when this method is called when
|
||||
* establishing a connection (and the status is hence still disconnected) timers for polling would be
|
||||
* killed.
|
||||
* establishing a connection (and the status is hence still disconnected) timers for polling would be killed.
|
||||
*/
|
||||
void SyncthingConnection::recalculateStatus()
|
||||
{
|
||||
|
@ -1018,7 +1017,7 @@ void SyncthingConnection::recalculateStatus()
|
|||
|
||||
/*!
|
||||
* \fn SyncthingConnection::statusChanged()
|
||||
* \brief Indicates the status of the connection changed.
|
||||
* \brief Indicates the status of the connection changed (status(), hasOutOfSyncDirs()).
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
|
@ -427,7 +427,8 @@ inline QString SyncthingConnection::statusText() const
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the connection status.
|
||||
* \brief Returns the (pre-computed) connection status.
|
||||
* \sa See SyncthingConnection::setStatus() and SyncthingStatus for details how it is computed.
|
||||
*/
|
||||
inline SyncthingStatus SyncthingConnection::status() const
|
||||
{
|
||||
|
|
|
@ -17,7 +17,14 @@ enum class SyncthingStatus { Disconnected, Reconnecting, Idle, Scanning, Paused,
|
|||
Q_ENUM_NS(SyncthingStatus)
|
||||
#endif
|
||||
|
||||
enum class SyncthingErrorCategory { OverallConnection, SpecificRequest, Parsing };
|
||||
/*!
|
||||
* \brief The SyncthingErrorCategory enum classifies different errors related to the SyncthingConnection class.
|
||||
*/
|
||||
enum class SyncthingErrorCategory {
|
||||
OverallConnection, /**< an error affecting the overall connection */
|
||||
SpecificRequest, /**< an error only affecting a specific request */
|
||||
Parsing, /**< an error when parsing Syncthing's response as a JSON document */
|
||||
};
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||
Q_ENUM_NS(SyncthingErrorCategory)
|
||||
#endif
|
||||
|
|
|
@ -19,7 +19,15 @@ namespace Data {
|
|||
/// \brief The SyncthingDevStatus enum represents a Syncthing device status.
|
||||
/// \remarks The device status is not directly provided by Syncthing and instead deduced by this library from
|
||||
/// other information and events.
|
||||
enum class SyncthingDevStatus { Unknown, Disconnected, OwnDevice, Idle, Synchronizing, OutOfSync, Rejected };
|
||||
enum class SyncthingDevStatus {
|
||||
Unknown, /**< device status is unknown */
|
||||
Disconnected, /**< device is disconnected */
|
||||
OwnDevice, /**< device is the own device; the own device will always have this status assigned */
|
||||
Idle, /**< device is connected and all shared directories are up-to-date on its end */
|
||||
Synchronizing, /**< device is connected but not all shared directories are up-to-date on its end */
|
||||
OutOfSync, /**< device is connected but not all shared directories are up-to-date on its end due to an error (never set so far; seems not possible to determine) */
|
||||
Rejected, /**< device is rejected */
|
||||
};
|
||||
|
||||
QString statusString(SyncthingDevStatus status);
|
||||
|
||||
|
|
Loading…
Reference in New Issue