Commit 138efafb authored by Yuri Chornoivan's avatar Yuri Chornoivan

Fix minor Doxygen issues

parent fc3ed417
......@@ -170,6 +170,7 @@ class KGET_EXPORT KGet
* Removes multiple transfers from the KGet
*
* @param transfers The transfers to be removed
* @param mode The deletion mode
*/
static bool delTransfers(const QList<TransferHandler*> &transfers, DeleteMode mode = AutoDelete);
......
......@@ -30,6 +30,10 @@ class KGET_EXPORT TransferDataSource : public QObject
TransferDataSource(const QUrl &srcUrl, QObject *parent);
virtual ~TransferDataSource();
/**
* @enum Error
* @brief Error type enum
*/
enum Error
{
Unknown,
......@@ -49,7 +53,7 @@ class KGET_EXPORT TransferDataSource : public QObject
* Tries to find the filesize if this capability is supported,
* if successful it emits foundFileSize(TransferDataSource*,KIO::filesize_t,QPair<int,int>)
* and assigns all segments to itself
* if not succesfull it will try to download the file nevertheless
* if not successful it will try to download the file nevertheless
* @note if stop is called and no size is found yet then this is aborted, i.e. needs to be
* called again if start is later called
* @param segmentSize the segments should have
......@@ -100,7 +104,7 @@ class KGET_EXPORT TransferDataSource : public QObject
* unfinished segments
* Each TransferDataSource can have multiple connections and each connection
* can have multiple segments assigned
* @note default implemention returns 0
* @note default implementation returns 0
*/
virtual int countUnfinishedSegments() const;
......@@ -113,26 +117,26 @@ class KGET_EXPORT TransferDataSource : public QObject
virtual QPair<int, int> split();//TODO should split also take the current running segment into account?
//the following methods are used for managing the number of paralell connections
//the following methods are used for managing the number of parallel connections
//subclasses have to keep track of the currentSegments
/**
* @return the number of paralell segments this DataSource is allowed to use,
* @return the number of parallel segments this DataSource is allowed to use,
* default is 1
*/
virtual int paralellSegments() const;
/**
* Sets the number of paralell segments this DataSource is allowed to use
* Sets the number of parallel segments this DataSource is allowed to use
*/
virtual void setParalellSegments(int paralellSegments);
/**
* @return the number of paralell segments this DataSources currently uses
* @return the number of parallel segments this DataSources currently uses
*/
virtual int currentSegments() const;
/**
* Returns the missmatch of paralellSegments() and currentSegments()
* Returns the mismatch of paralellSegments() and currentSegments()
* @return the number of segments to add/remove e.g. -1 means one segment to remove
*/
virtual int changeNeeded() const;
......@@ -140,7 +144,7 @@ class KGET_EXPORT TransferDataSource : public QObject
signals:
/**
* Emitted after findFileSize is called successfully
* @param source that foudn the filesize
* @param source that found the filesize
* @param fileSize that was found
* @param segmentRange that was calculated based on the segmentSize and that was assigned to
* source automatically
......@@ -155,7 +159,7 @@ class KGET_EXPORT TransferDataSource : public QObject
/**
* Emitted when the TransferDataSource finished the download on its own, e.g. when findFileSize
* is being called but no fileSize is found and instead the download finishes
* @param source the source that emmited this signal
* @param source the source that emitted this signal
* @param fileSize the fileSize of the finished file (calculated by the downloaded bytes)
*/
void finishedDownload(TransferDataSource *source, KIO::filesize_t fileSize);
......@@ -189,22 +193,23 @@ class KGET_EXPORT TransferDataSource : public QObject
/**
* emitted when an assigned segment finishes
* @param source the source that emmited this signal
* @param source the source that emitted this signal
* @param segmentNumber the number of the segment, to identify it
* @param connectionFinished true if all segments of this connection have been finished,
* if one segement (instead of a group of segments) has been asigned this is always true
* if one segment (instead of a group of segments) has been assigned this is always true
*/
void finishedSegment(TransferDataSource *source, int segmentNumber, bool connectionFinished = true);
/**
* Alert that datasource is no able to send any data
*@param source the datasource, sending the signal
* @param source the datasource, sending the signal
* @param error the error type
*/
void broken(TransferDataSource *source, TransferDataSource::Error error);
/**
* emitted when an assigned segment is broken
* @param source the source that emmited this signal
* @param source the source that emitted this signal
* @param segmentRange the range of the segments e.g. (1,1,) or (0, 10)
*/
void brokenSegments(TransferDataSource *source, QPair<int, int> segmentRange);
......
......@@ -144,7 +144,8 @@ class KGET_EXPORT TransferGroupHandler : public Handler
/**
* Set a Download-Limit for the group
* @param limit the new download-limit
* @param dlLimit the new download-limit
* @param limit the type of the new download-limit
* @note if limit is 0, no download-limit is set
*/
void setDownloadLimit(int dlLimit, Transfer::SpeedLimit limit) {m_group->setDownloadLimit(dlLimit, limit);}
......@@ -156,7 +157,8 @@ class KGET_EXPORT TransferGroupHandler : public Handler
/**
* Set a Upload-Limit for the group
* @param limit the new upload-limit
* @param ulLimit the new upload-limit
* @param limit the type of the new upload-limit
* @note this will not be displayed in the GUI
*/
void setUploadLimit(int ulLimit, Transfer::SpeedLimit limit) {m_group->setUploadLimit(ulLimit, limit);}
......
......@@ -115,16 +115,17 @@ class KGET_EXPORT TransferHandler : public Handler
/**
* The mirrors that are available
* bool if it is used, int how many paralell connections are allowed
* bool if it is used, int how many parallel connections are allowed
* to the mirror
* @param file the file for which the availableMirrors should be get
*/
QHash<QUrl, QPair<bool, int> > availableMirrors(const QUrl &file) const {return m_transfer->availableMirrors(file);}
/**
* Set the mirrors, int the number of paralell connections to the mirror
* Set the mirrors, int the number of parallel connections to the mirror
* bool if the mirror should be used
* @param file the file for which the availableMirrors should be set
* @param mirrors the mirror list
*/
void setAvailableMirrors(const QUrl &file, const QHash<QUrl, QPair<bool, int> > &mirrors) {m_transfer->setAvailableMirrors(file, mirrors);}
......@@ -166,14 +167,16 @@ class KGET_EXPORT TransferHandler : public Handler
/**
* Set an UploadLimit for the transfer
* @note this UploadLimit is not visible in the GUI
* @param ulLimit upload Limit
* @param ulLimit the upload limit
* @param limit the type of the upload Limit
*/
void setUploadLimit(int ulLimit, Transfer::SpeedLimit limit) {m_transfer->setUploadLimit(ulLimit, limit);}
/**
* Set a DownloadLimit for the transfer
* @note this DownloadLimit is not visible in the GUI
* @param dlLimit download Limit
* @param dlLimit download limit
* @param limit the type of the download Limit
*/
void setDownloadLimit(int dlLimit, Transfer::SpeedLimit limit) {m_transfer->setDownloadLimit(dlLimit, limit);}
......
......@@ -90,6 +90,7 @@ class KGET_EXPORT UrlChecker
* Checks if url points to a file (can be non-existent) and if the
* directory this file is (would) be in is existent and writeable
*
* @param url the URL
* @param type all types supported here
* @param showNotification true shows a notification if an error is found
* @note checkExisting is not done within this method
......@@ -101,18 +102,21 @@ class KGET_EXPORT UrlChecker
/**
* Convenience method of checkUrl
* @param source the URL
* @param showNotification true shows a notification if an error is found
*/
static UrlError checkSource(const QUrl &source, bool showNotification = false);
/**
* Convenience method of checkUrl
* @param destination the URL
* @param showNotification true shows a notification if an error is found
*/
static UrlError checkDestination(const QUrl &destination, bool showNotification = false);
/**
* Convenience method of checkUrl
* @param folder the folder
* @param showNotification true shows a notification if an error is found
*/
static UrlError checkFolder(const QUrl &folder, bool showNotification = false);
......@@ -130,8 +134,10 @@ class KGET_EXPORT UrlChecker
/**
* Checks if there is an existing transfer for url with type
* @param type *Source checks if there is a transfer with the same source
* *Destination checks if there is a transfer with the same destination
* @param url the URL
* @param type Source checks if there is a transfer with the same source
* destination checks if there is a transfer with the same destination
* @param warning the warning
* @return if an existing transfer is found it will be returned,
* otherwise nullptr will be returned
* @note checkUrl check is not done and UrlType Folder is not supported
......@@ -149,6 +155,8 @@ class KGET_EXPORT UrlChecker
* Get a describing message for UrlError
* @param url is only needed here to include it in some error messages,
* if url is empty, then it won't be used.
* @param type the URL type
* @param error the error
* @note this method does no checks, it only creates messages based on the error code
* @see checkUrl
*/
......@@ -179,9 +187,11 @@ class KGET_EXPORT UrlChecker
* Takes an url to a source and an url to either the destination or a folder
* and returns a destination url.
*
* @param destOrFolder *is an existing folder then a file name derived from source
* @param destOrFolder An existing folder then a file name derived from source
* will be appended to it and returned
* *otherwise no modification will be done and destOrFolder will be returned
* otherwise no modification will be done and destOrFolder will be returned
* @param source the source
* @param fileName the filename
* @note no checkUrl check happens!
* @see checkUrl
*/
......
......@@ -123,13 +123,18 @@ class KGET_EXPORT Verifier : public QObject
static QString cleanChecksumType(const QString &type);
/**
* Creates the checksum type of the file dest
* Creates the checksum type of the file @p dest
* @param dest the destination
* @param type the type of the checksum
* @param abortPtr makes it possible to abort the calculation of the checksum from another thread
*/
static QString checksum(const QUrl &dest, const QString &type, bool *abortPtr);
/**
* Create partial checksums of type for file dest
* Create partial checksums of type for file @p dest
* @param dest the destination
* @param type the type of the checksum
* @param length the file length
* @param abortPtr makes it possible to abort the calculation of the checksums from another thread
* @note the length of the partial checksum (if not defined = 0) is not less than 512 kb
* and there won't be more partial checksums than 101
......
......@@ -88,6 +88,7 @@ class DBusTransferWrapper : public QObject
* Set an UploadLimit for the transfer
* @note this UploadLimit is not visible in the GUI
* @param ulLimit upload Limit
* @param limit the type of the upload limit
*/
void setUploadLimit(int ulLimit, int limit);
......@@ -95,6 +96,7 @@ class DBusTransferWrapper : public QObject
* Set a DownloadLimit for the transfer
* @note this DownloadLimit is not visible in the GUI
* @param dlLimit download Limit
* @param limit the type of the download limit
*/
void setDownloadLimit(int dlLimit, int limit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment