diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-24 13:19:38 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-07-24 13:19:38 +0300 |
commit | 0f0b4250ca460d58edb61cc0dd509ba1980c3272 (patch) | |
tree | e8e9be30b2ec7942c4796cf93cbbd42e0c272e6a /src/gmrequest.h | |
parent | dd73346aad190239ed133d0c4835dbaa05d1b0cd (diff) |
Added GmRequest for handling the request
This feels a little bit too complex, with GmRequest observing TlsRequest and then notifying its own audience. There are still some issues with cancelling requests as well.
Diffstat (limited to 'src/gmrequest.h')
-rw-r--r-- | src/gmrequest.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gmrequest.h b/src/gmrequest.h new file mode 100644 index 00000000..e7d5916b --- /dev/null +++ b/src/gmrequest.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <the_Foundation/audience.h> | ||
4 | #include <the_Foundation/object.h> | ||
5 | |||
6 | #include "gemini.h" | ||
7 | |||
8 | iDeclareClass(GmRequest) | ||
9 | iDeclareObjectConstruction(GmRequest) | ||
10 | |||
11 | iDeclareNotifyFunc(GmRequest, Updated) | ||
12 | iDeclareNotifyFunc(GmRequest, Finished) | ||
13 | iDeclareAudienceGetter(GmRequest, updated) | ||
14 | iDeclareAudienceGetter(GmRequest, finished) | ||
15 | |||
16 | void setUrl_GmRequest (iGmRequest *, const iString *url); | ||
17 | void submit_GmRequest (iGmRequest *); | ||
18 | |||
19 | iBool isFinished_GmRequest (const iGmRequest *); | ||
20 | const char * error_GmRequest (const iGmRequest *); /* NULL if successful */ | ||
21 | enum iGmStatusCode status_GmRequest (const iGmRequest *); | ||
22 | const iString * meta_GmRequest (const iGmRequest *); | ||
23 | const iBlock * body_GmRequest (const iGmRequest *); | ||