2 * Copyright 2010-2015 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
7 #ifndef _B_URL_CONTEXT_H_
8 #define _B_URL_CONTEXT_H_
11 #include <Certificate.h>
12 #include <HttpAuthentication.h>
13 #include <NetworkCookieJar.h>
14 #include <Referenceable.h>
18 template <class key
, class value
> class SynchronizedHashMap
;
23 class BUrlContext
: public BReferenceable
{
30 const BNetworkCookieJar
& cookieJar
);
31 void AddAuthentication(const BUrl
& url
,
32 const BHttpAuthentication
& authentication
);
33 void SetProxy(BString host
, uint16 port
);
34 void AddCertificateException(const BCertificate
& certificate
);
37 BNetworkCookieJar
& GetCookieJar();
38 BHttpAuthentication
& GetAuthentication(const BUrl
& url
);
40 BString
GetProxyHost();
41 uint16
GetProxyPort();
42 bool HasCertificateException(const BCertificate
& certificate
);
45 BNetworkCookieJar fCookieJar
;
46 typedef BPrivate::SynchronizedHashMap
<BPrivate::HashString
,
47 BHttpAuthentication
*> BHttpAuthenticationMap
;
48 BHttpAuthenticationMap
* fAuthenticationMap
;
49 typedef BObjectList
<const BCertificate
> BCertificateSet
;
50 BCertificateSet fCertificates
;
57 #endif // _B_URL_CONTEXT_H_