Lines Matching refs:policy
72 soup_hsts_policy_copy (SoupHSTSPolicy *policy) in G_DEFINE_BOXED_TYPE()
76 copy->domain = g_strdup (policy->domain); in G_DEFINE_BOXED_TYPE()
77 copy->max_age = policy->max_age; in G_DEFINE_BOXED_TYPE()
78 copy->expires = policy->expires ? in G_DEFINE_BOXED_TYPE()
79 soup_date_copy (policy->expires) : NULL; in G_DEFINE_BOXED_TYPE()
80 copy->include_subdomains = policy->include_subdomains; in G_DEFINE_BOXED_TYPE()
194 SoupHSTSPolicy *policy; in soup_hsts_policy_new_full() local
198 policy = g_slice_new0 (SoupHSTSPolicy); in soup_hsts_policy_new_full()
201 policy->domain = g_hostname_to_unicode (domain); in soup_hsts_policy_new_full()
202 if (!policy->domain) { in soup_hsts_policy_new_full()
203 g_slice_free (SoupHSTSPolicy, policy); in soup_hsts_policy_new_full()
207 policy->domain = g_strdup (domain); in soup_hsts_policy_new_full()
210 policy->max_age = max_age; in soup_hsts_policy_new_full()
211 policy->expires = expires; in soup_hsts_policy_new_full()
212 policy->include_subdomains = include_subdomains; in soup_hsts_policy_new_full()
214 return policy; in soup_hsts_policy_new_full()
243 SoupHSTSPolicy *policy; in soup_hsts_policy_new_session_policy() local
245 policy = soup_hsts_policy_new_full (domain, 0, NULL, include_subdomains); in soup_hsts_policy_new_session_policy()
247 return policy; in soup_hsts_policy_new_session_policy()
279 SoupHSTSPolicy *policy = NULL; in soup_hsts_policy_new_from_response() local
305 policy = soup_hsts_policy_new (uri->host, max_age, include_subdomains); in soup_hsts_policy_new_from_response()
308 return policy; in soup_hsts_policy_new_from_response()
325 soup_hsts_policy_get_domain (SoupHSTSPolicy *policy) in soup_hsts_policy_get_domain() argument
327 g_return_val_if_fail (policy != NULL, NULL); in soup_hsts_policy_get_domain()
329 return policy->domain; in soup_hsts_policy_get_domain()
344 soup_hsts_policy_is_expired (SoupHSTSPolicy *policy) in soup_hsts_policy_is_expired() argument
346 g_return_val_if_fail (policy != NULL, TRUE); in soup_hsts_policy_is_expired()
348 return policy->expires && soup_date_is_past (policy->expires); in soup_hsts_policy_is_expired()
362 soup_hsts_policy_includes_subdomains (SoupHSTSPolicy *policy) in soup_hsts_policy_includes_subdomains() argument
364 g_return_val_if_fail (policy != NULL, FALSE); in soup_hsts_policy_includes_subdomains()
366 return policy->include_subdomains; in soup_hsts_policy_includes_subdomains()
381 soup_hsts_policy_is_session_policy (SoupHSTSPolicy *policy) in soup_hsts_policy_is_session_policy() argument
383 g_return_val_if_fail (policy != NULL, FALSE); in soup_hsts_policy_is_session_policy()
385 return !policy->expires; in soup_hsts_policy_is_session_policy()
397 soup_hsts_policy_free (SoupHSTSPolicy *policy) in soup_hsts_policy_free() argument
399 g_return_if_fail (policy != NULL); in soup_hsts_policy_free()
401 g_free (policy->domain); in soup_hsts_policy_free()
402 g_clear_pointer (&policy->expires, soup_date_free); in soup_hsts_policy_free()
403 g_slice_free (SoupHSTSPolicy, policy); in soup_hsts_policy_free()