blob: 3b2ee3b3894d0590e6671a6620f4e5cc23fa531b (
plain)
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
|
#pragma once
#include <the_Foundation/audience.h>
#include <the_Foundation/tlsrequest.h>
#include "gmutil.h"
iDeclareType(GmResponse)
enum iGmCertFlags {
available_GmCertFlag = iBit(1), /* certificate provided by server */
trusted_GmCertFlag = iBit(2), /* TOFU status */
timeVerified_GmCertFlag = iBit(3), /* has not expired */
domainVerified_GmCertFlag = iBit(4), /* cert matches server domain */
};
struct Impl_GmResponse {
enum iGmStatusCode statusCode;
iString meta; /* MIME type or other metadata */
iBlock body;
int certFlags;
iDate certValidUntil;
iString certSubject;
};
iDeclareTypeConstruction(GmResponse)
iGmResponse * copy_GmResponse (const iGmResponse *);
/*----------------------------------------------------------------------------------------------*/
iDeclareClass(GmRequest)
iDeclareObjectConstruction(GmRequest)
iDeclareNotifyFunc(GmRequest, Updated)
iDeclareNotifyFunc(GmRequest, Finished)
iDeclareAudienceGetter(GmRequest, updated)
iDeclareAudienceGetter(GmRequest, finished)
void setUrl_GmRequest (iGmRequest *, const iString *url);
void submit_GmRequest (iGmRequest *);
void cancel_GmRequest (iGmRequest *);
iBool isFinished_GmRequest (const iGmRequest *);
enum iGmStatusCode status_GmRequest (const iGmRequest *);
const iString * meta_GmRequest (const iGmRequest *);
const iBlock * body_GmRequest (const iGmRequest *);
const iString * url_GmRequest (const iGmRequest *);
const iGmResponse * response_GmRequest (const iGmRequest *);
int certFlags_GmRequest (const iGmRequest *);
iDate certExpirationDate_GmRequest(const iGmRequest *);
|