-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageShackError.hpp
More file actions
78 lines (70 loc) · 2.68 KB
/
ImageShackError.hpp
File metadata and controls
78 lines (70 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*********************************************************************
* Thumbnail me 3.0
*
* Thumbnail me is a user interface for Movie thumbnailer.
* Generate thumbnails from any movie is now easier !
*
* @package Thumbnail me 3.0
* @author Christ Azika-Eros <christ@azika-eros.org>
* @copyright Quentin Rousseau (c) 2010 2009, Quentin Rousseau
* @license Creative Commons GNU GPL
* http://creativecommons.org/licenses/GPL/2.0/
* @link http://thumbnailme.sourceforge.net/
* @version 3.0
*
* @filesource ImageShackResponse.hpp
* @role The header of the ImageShackResponse class.
* This class handle ImageShack upload response
*
*********************************************************************/
#ifndef HEADER_IMAGESHACKERROR
#define HEADER_IMAGESHACKERROR
#include <QByteArray>
#include <QDebug>
#include <QNetworkReply>
#include <QString>
#include <QWidget>
/**
* ImageShackError class
*
**/
class ImageShackError : public QObject
{
Q_OBJECT
public : // variables, enums
/**
* Enumeration specifing the type of error.
* Its include the QNetworkReply::NetworkError enumeration
* @see QNetworkReply
**/
enum UploadError{NoError , ConnectionRefusedError,
RemoteHostClosedError , HostNotFoundError,
TimeoutError , OperationCanceledError,
SslHandshakeFailedError , ProxyConnectionRefusedError,
ProxyConnectionClosedError , ProxyNotFoundError,
ProxyTimeoutError , ProxyAuthenticationRequiredError,
ContentAccessDenied , ContentOperationNotPermittedError,
ContentNotFoundError , AuthenticationRequiredError,
ProtocolUnknownError , ProtocolInvalidOperationError,
UnknownNetworkError , UnknownProxyError,
UnknownContentError , ProtocolFailure ,
ContentReSendError , UnKnownError,
TemporaryNetworkFailureError, FailedOpeningTheFile,
MaxSizeReached};
public : // public method
/**
* Return the error code coresponding to the network error
*
**/
static UploadError getErrorCode(QNetworkReply::NetworkError errorCode);
/**
* @brief Return the error code corresponding to an ImageShack error
*
* @param usableResponse
*
* @return
*/
static UploadError getErrorCode(QHash<QString, QString> usableResponse);
//public : // Setters and Getters
};
#endif