summaryrefslogtreecommitdiff
path: root/src/gmrequest.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-07-24 13:19:38 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-07-24 13:19:38 +0300
commit0f0b4250ca460d58edb61cc0dd509ba1980c3272 (patch)
treee8e9be30b2ec7942c4796cf93cbbd42e0c272e6a /src/gmrequest.h
parentdd73346aad190239ed133d0c4835dbaa05d1b0cd (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.h23
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
8iDeclareClass(GmRequest)
9iDeclareObjectConstruction(GmRequest)
10
11iDeclareNotifyFunc(GmRequest, Updated)
12iDeclareNotifyFunc(GmRequest, Finished)
13iDeclareAudienceGetter(GmRequest, updated)
14iDeclareAudienceGetter(GmRequest, finished)
15
16void setUrl_GmRequest (iGmRequest *, const iString *url);
17void submit_GmRequest (iGmRequest *);
18
19iBool isFinished_GmRequest (const iGmRequest *);
20const char * error_GmRequest (const iGmRequest *); /* NULL if successful */
21enum iGmStatusCode status_GmRequest (const iGmRequest *);
22const iString * meta_GmRequest (const iGmRequest *);
23const iBlock * body_GmRequest (const iGmRequest *);