summaryrefslogtreecommitdiff
path: root/src/gmcerts.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-27 12:10:33 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-27 12:10:33 +0300
commitee8b890f2412119add7870d7aadd07078d6b315c (patch)
tree2355e37c3e444decabf60cc6c8da3c3fdcc645d7 /src/gmcerts.h
parent5aee0dbef19c954c6898ee9048baf03d515d4e26 (diff)
GmCerts: Use a StringSet for identity URLs
Diffstat (limited to 'src/gmcerts.h')
-rw-r--r--src/gmcerts.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gmcerts.h b/src/gmcerts.h
index 35beca7c..1730ca8e 100644
--- a/src/gmcerts.h
+++ b/src/gmcerts.h
@@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
23#pragma once 23#pragma once
24 24
25#include <the_Foundation/ptrarray.h> 25#include <the_Foundation/ptrarray.h>
26#include <the_Foundation/stringset.h>
26#include <the_Foundation/tlsrequest.h> 27#include <the_Foundation/tlsrequest.h>
27 28
28iDeclareType(GmIdentity) 29iDeclareType(GmIdentity)
@@ -34,16 +35,21 @@ enum iGmIdentityFlags {
34}; 35};
35 36
36struct Impl_GmIdentity { 37struct Impl_GmIdentity {
37// iString fileName;
38 iBlock fingerprint; 38 iBlock fingerprint;
39 iTlsCertificate *cert; 39 iTlsCertificate *cert;
40 iSortedArray useUrls; /* Strings */ 40 iStringSet *useUrls;
41 iChar icon; 41 iChar icon;
42 iString notes; /* private, local usage notes */ 42 iString notes; /* private, local usage notes */
43 int flags; 43 int flags;
44}; 44};
45 45
46iBool isUsed_GmIdentity (const iGmIdentity *); 46iBool isUsed_GmIdentity (const iGmIdentity *);
47iBool isUsedOn_GmIdentity (const iGmIdentity *, const iString *url);
48
49void setUse_GmIdentity (iGmIdentity *, const iString *url, iBool use);
50void clearUse_GmIdentity (iGmIdentity *);
51
52/*----------------------------------------------------------------------------------------------*/
47 53
48iDeclareType(GmCerts) 54iDeclareType(GmCerts)
49iDeclareTypeConstructionArgs(GmCerts, const char *saveDir) 55iDeclareTypeConstructionArgs(GmCerts, const char *saveDir)