diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-26 14:31:05 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-26 14:31:05 +0300 |
commit | dd4c7ce2e7c55098a90e5b8a265299d10bd52cef (patch) | |
tree | e5c60b5b14d3a9aa2b97a955a568ff2a6a30b8bc /src/gemini.h | |
parent | 37009e2f98334632b76dbba08712186ae48cfc36 (diff) |
Full set of Gemini status codes
Diffstat (limited to 'src/gemini.h')
-rw-r--r-- | src/gemini.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gemini.h b/src/gemini.h index 3c00d425..ffe269df 100644 --- a/src/gemini.h +++ b/src/gemini.h | |||
@@ -1,9 +1,12 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include <the_Foundation/string.h> | ||
4 | |||
3 | /* Response status codes. */ | 5 | /* Response status codes. */ |
4 | enum iGmStatusCode { | 6 | enum iGmStatusCode { |
5 | failedToOpenFile_GmStatusCode = -2, | 7 | invalidRedirect_GmStatusCode = -3, |
6 | invalidHeader_GmStatusCode = -1, | 8 | invalidHeader_GmStatusCode = -2, |
9 | failedToOpenFile_GmStatusCode = -1, | ||
7 | none_GmStatusCode = 0, | 10 | none_GmStatusCode = 0, |
8 | input_GmStatusCode = 10, | 11 | input_GmStatusCode = 10, |
9 | sensitiveInput_GmStatusCode = 11, | 12 | sensitiveInput_GmStatusCode = 11, |
@@ -24,3 +27,13 @@ enum iGmStatusCode { | |||
24 | certificateNotAuthorized_GmStatusCode = 61, | 27 | certificateNotAuthorized_GmStatusCode = 61, |
25 | certificateNotValid_GmStatusCode = 62, | 28 | certificateNotValid_GmStatusCode = 62, |
26 | }; | 29 | }; |
30 | |||
31 | iDeclareType(GmError) | ||
32 | |||
33 | struct Impl_GmError { | ||
34 | iChar icon; | ||
35 | const char *title; | ||
36 | const char *info; | ||
37 | }; | ||
38 | |||
39 | const iGmError * get_GmError (enum iGmStatusCode code); | ||