~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebKit2/UIProcess/API/gtk/WebKitError.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Igalia S.L.
 
3
 * Copyright (C) 2008 Luca Bruno <lethalman88@gmail.com>
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Library General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * Library General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Library General Public License
 
16
 * along with this library; see the file COPYING.LIB.  If not, write to
 
17
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
 
22
#error "Only <webkit2/webkit2.h> can be included directly."
 
23
#endif
 
24
 
 
25
#ifndef WebKitError_h
 
26
#define WebKitError_h
 
27
 
 
28
#include <webkit2/WebKitDefines.h>
 
29
 
 
30
G_BEGIN_DECLS
 
31
 
 
32
#define WEBKIT_NETWORK_ERROR    webkit_network_error_quark ()
 
33
#define WEBKIT_POLICY_ERROR     webkit_policy_error_quark ()
 
34
#define WEBKIT_PLUGIN_ERROR     webkit_plugin_error_quark ()
 
35
#define WEBKIT_DOWNLOAD_ERROR   webkit_download_error_quark ()
 
36
#define WEBKIT_PRINT_ERROR      webkit_print_error_quark ()
 
37
#define WEBKIT_JAVASCRIPT_ERROR webkit_print_error_quark ()
 
38
 
 
39
/**
 
40
 * WebKitNetworkError:
 
41
 * @WEBKIT_NETWORK_ERROR_FAILED: Generic load failure
 
42
 * @WEBKIT_NETWORK_ERROR_TRANSPORT: Load failure due to transport error
 
43
 * @WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL: Load failure due to unknown protocol
 
44
 * @WEBKIT_NETWORK_ERROR_CANCELLED: Load failure due to cancellation
 
45
 * @WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST: Load failure due to missing file
 
46
 *
 
47
 * Enum values used to denote the various network errors.
 
48
 **/
 
49
typedef enum {
 
50
    WEBKIT_NETWORK_ERROR_FAILED = 399,
 
51
    WEBKIT_NETWORK_ERROR_TRANSPORT = 300,
 
52
    WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL = 301,
 
53
    WEBKIT_NETWORK_ERROR_CANCELLED = 302,
 
54
    WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST = 303
 
55
} WebKitNetworkError;
 
56
 
 
57
/**
 
58
 * WebKitPolicyError:
 
59
 * @WEBKIT_POLICY_ERROR_FAILED: Generic load failure due to policy error
 
60
 * @WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE: Load failure due to unsupported mime type
 
61
 * @WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI: Load failure due to URI that can not be shown
 
62
 * @WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE: Load failure due to frame load interruption by policy change
 
63
 * @WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT: Load failure due to port restriction
 
64
 *
 
65
 * Enum values used to denote the various policy errors.
 
66
 **/
 
67
typedef enum {
 
68
    WEBKIT_POLICY_ERROR_FAILED = 199,
 
69
    WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE = 100,
 
70
    WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI = 101,
 
71
    WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE = 102,
 
72
    WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT = 103
 
73
} WebKitPolicyError;
 
74
 
 
75
/**
 
76
 * WebKitPluginError:
 
77
 * @WEBKIT_PLUGIN_ERROR_FAILED: Generic plugin load failure
 
78
 * @WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN: Load failure due to missing plugin
 
79
 * @WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN: Load failure due to inability to load plugin
 
80
 * @WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE: Load failue due to missing Java support that is required to load plugin
 
81
 * @WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED: Load failure due to connection cancellation
 
82
 * @WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD: Load failure since plugin handles the load
 
83
 *
 
84
 * Enum values used to denote the various plugin errors.
 
85
 **/
 
86
typedef enum {
 
87
    WEBKIT_PLUGIN_ERROR_FAILED = 299,
 
88
    WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN = 200,
 
89
    WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN = 201,
 
90
    WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE = 202,
 
91
    WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED = 203,
 
92
    WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD = 204,
 
93
} WebKitPluginError;
 
94
 
 
95
/**
 
96
 * WebKitDownloadError:
 
97
 * @WEBKIT_DOWNLOAD_ERROR_NETWORK: Download failure due to network error
 
98
 * @WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER: Download was cancelled by user
 
99
 * @WEBKIT_DOWNLOAD_ERROR_DESTINATION: Download failure due to destination error
 
100
 *
 
101
 * Enum values used to denote the various download errors.
 
102
 */
 
103
typedef enum {
 
104
    WEBKIT_DOWNLOAD_ERROR_NETWORK = 499,
 
105
    WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER = 400,
 
106
    WEBKIT_DOWNLOAD_ERROR_DESTINATION = 401
 
107
} WebKitDownloadError;
 
108
 
 
109
/**
 
110
 * WebKitPrintError:
 
111
 * @WEBKIT_PRINT_ERROR_GENERAL: Unspecified error during a print operation
 
112
 * @WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND: Selected printer cannot be found
 
113
 * @WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE: Invalid page range
 
114
 *
 
115
 * Enum values used to denote the various print errors.
 
116
 */
 
117
typedef enum {
 
118
    WEBKIT_PRINT_ERROR_GENERAL = 599,
 
119
    WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND = 500,
 
120
    WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE = 501
 
121
} WebKitPrintError;
 
122
 
 
123
/**
 
124
 * WebKitJavascriptError:
 
125
 * @WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED: An exception was raised in Javascript execution
 
126
 *
 
127
 * Enum values used to denote errors happending when executing Javascript
 
128
 */
 
129
typedef enum {
 
130
    WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED = 699
 
131
} WebKitJavascriptError;
 
132
 
 
133
WEBKIT_API GQuark
 
134
webkit_network_error_quark    (void);
 
135
 
 
136
WEBKIT_API GQuark
 
137
webkit_policy_error_quark     (void);
 
138
 
 
139
WEBKIT_API GQuark
 
140
webkit_plugin_error_quark     (void);
 
141
 
 
142
WEBKIT_API GQuark
 
143
webkit_download_error_quark   (void);
 
144
 
 
145
WEBKIT_API GQuark
 
146
webkit_print_error_quark      (void);
 
147
 
 
148
WEBKIT_API GQuark
 
149
webkit_javascript_error_quark (void);
 
150
 
 
151
G_END_DECLS
 
152
 
 
153
#endif