Trait webview2_sys::ICoreWebView2Cookie [−][src]
pub trait ICoreWebView2Cookie: IUnknown {
Show 14 methods
unsafe fn get_name(&self, name: *mut LPWSTR) -> HRESULT;
unsafe fn get_value(&self, value: *mut LPWSTR) -> HRESULT;
unsafe fn put_value(&self, value: LPCWSTR) -> HRESULT;
unsafe fn get_domain(&self, domain: *mut LPWSTR) -> HRESULT;
unsafe fn get_path(&self, path: *mut LPWSTR) -> HRESULT;
unsafe fn get_expires(&self, expires: *mut f64) -> HRESULT;
unsafe fn put_expires(&self, expires: f64) -> HRESULT;
unsafe fn get_is_http_only(&self, is_http_only: *mut BOOL) -> HRESULT;
unsafe fn put_is_http_only(&self, is_http_only: BOOL) -> HRESULT;
unsafe fn get_same_site(
&self,
same_site: *mut CookieSameSiteKind
) -> HRESULT;
unsafe fn put_same_site(&self, same_site: CookieSameSiteKind) -> HRESULT;
unsafe fn get_is_secure(&self, is_secure: *mut BOOL) -> HRESULT;
unsafe fn put_is_secure(&self, is_secure: BOOL) -> HRESULT;
unsafe fn get_is_session(&self, is_session: *mut BOOL) -> HRESULT;
}
Expand description
Provides a set of properties that are used to manage an ICoreWebView2Cookie.
\snippet ScenarioCookieManagement.cpp CookieObject
Required methods
unsafe fn get_domain(&self, domain: *mut LPWSTR) -> HRESULT
unsafe fn get_domain(&self, domain: *mut LPWSTR) -> HRESULT
The domain for which the cookie is valid. The default is the host that this cookie has been received from. Note that, for instance, “.bing.com”, “bing.com”, and “www.bing.com” are considered different domains.
The path for which the cookie is valid. The default is “/”, which means this cookie will be sent to all pages on the Domain.
unsafe fn get_expires(&self, expires: *mut f64) -> HRESULT
unsafe fn get_expires(&self, expires: *mut f64) -> HRESULT
The expiration date and time for the cookie as the number of seconds since the UNIX epoch. The default is -1.0, which means cookies are session cookies by default.
unsafe fn put_expires(&self, expires: f64) -> HRESULT
unsafe fn put_expires(&self, expires: f64) -> HRESULT
Set the Expires property. Cookies are session cookies and will not be persistent if Expires is set to -1.0. NaN, infinity, and any negative value set other than -1.0 is disallowed.
unsafe fn get_is_http_only(&self, is_http_only: *mut BOOL) -> HRESULT
unsafe fn get_is_http_only(&self, is_http_only: *mut BOOL) -> HRESULT
Whether this cookie is http-only. True if a page script or other active content cannot access this cookie. The default is false.
unsafe fn put_is_http_only(&self, is_http_only: BOOL) -> HRESULT
unsafe fn put_is_http_only(&self, is_http_only: BOOL) -> HRESULT
Set the IsHttpOnly property.
unsafe fn get_same_site(&self, same_site: *mut CookieSameSiteKind) -> HRESULT
unsafe fn get_same_site(&self, same_site: *mut CookieSameSiteKind) -> HRESULT
SameSite status of the cookie which represents the enforcement mode of the cookie. The default is COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX.
unsafe fn put_same_site(&self, same_site: CookieSameSiteKind) -> HRESULT
unsafe fn put_same_site(&self, same_site: CookieSameSiteKind) -> HRESULT
Set the SameSite property.
unsafe fn get_is_secure(&self, is_secure: *mut BOOL) -> HRESULT
unsafe fn get_is_secure(&self, is_secure: *mut BOOL) -> HRESULT
The security level of this cookie. True if the client is only to return the cookie in subsequent requests if those requests use HTTPS. The default is false. Note that cookie that requests COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE but is not marked Secure will be rejected.
unsafe fn put_is_secure(&self, is_secure: BOOL) -> HRESULT
unsafe fn put_is_secure(&self, is_secure: BOOL) -> HRESULT
Set the IsSecure property.
unsafe fn get_is_session(&self, is_session: *mut BOOL) -> HRESULT
unsafe fn get_is_session(&self, is_session: *mut BOOL) -> HRESULT
Whether this is a session cookie. The default is false.
Trait Implementations
type VTable = ICoreWebView2CookieVTable
type VTable = ICoreWebView2CookieVTable
A COM compatible V-Table
Check whether a given IID is in the inheritance hierarchy of this interface