Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype CookieJar = CookieJar (ManagedPtr CookieJar)
- class GObject o => IsCookieJar o
- toCookieJar :: IsCookieJar o => o -> IO CookieJar
- noCookieJar :: Maybe CookieJar
- data CookieJarAddCookieMethodInfo
- cookieJarAddCookie :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> Cookie -> m ()
- data CookieJarAddCookieWithFirstPartyMethodInfo
- cookieJarAddCookieWithFirstParty :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> URI -> Cookie -> m ()
- data CookieJarAllCookiesMethodInfo
- cookieJarAllCookies :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> m [Cookie]
- data CookieJarDeleteCookieMethodInfo
- cookieJarDeleteCookie :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> Cookie -> m ()
- data CookieJarGetAcceptPolicyMethodInfo
- cookieJarGetAcceptPolicy :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> m CookieJarAcceptPolicy
- data CookieJarGetCookieListMethodInfo
- cookieJarGetCookieList :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> URI -> Bool -> m [Cookie]
- data CookieJarGetCookiesMethodInfo
- cookieJarGetCookies :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> URI -> Bool -> m (Maybe Text)
- data CookieJarIsPersistentMethodInfo
- cookieJarIsPersistent :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> m Bool
- cookieJarNew :: (HasCallStack, MonadIO m) => m CookieJar
- data CookieJarSaveMethodInfo
- cookieJarSave :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> m ()
- data CookieJarSetAcceptPolicyMethodInfo
- cookieJarSetAcceptPolicy :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> CookieJarAcceptPolicy -> m ()
- data CookieJarSetCookieMethodInfo
- cookieJarSetCookie :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> URI -> Text -> m ()
- data CookieJarSetCookieWithFirstPartyMethodInfo
- cookieJarSetCookieWithFirstParty :: (HasCallStack, MonadIO m, IsCookieJar a) => a -> URI -> URI -> Text -> m ()
- data CookieJarAcceptPolicyPropertyInfo
- constructCookieJarAcceptPolicy :: IsCookieJar o => CookieJarAcceptPolicy -> IO (GValueConstruct o)
- cookieJarAcceptPolicy :: AttrLabelProxy "acceptPolicy"
- getCookieJarAcceptPolicy :: (MonadIO m, IsCookieJar o) => o -> m CookieJarAcceptPolicy
- setCookieJarAcceptPolicy :: (MonadIO m, IsCookieJar o) => o -> CookieJarAcceptPolicy -> m ()
- data CookieJarReadOnlyPropertyInfo
- constructCookieJarReadOnly :: IsCookieJar o => Bool -> IO (GValueConstruct o)
- cookieJarReadOnly :: AttrLabelProxy "readOnly"
- getCookieJarReadOnly :: (MonadIO m, IsCookieJar o) => o -> m Bool
- type C_CookieJarChangedCallback = Ptr () -> Ptr Cookie -> Ptr Cookie -> Ptr () -> IO ()
- type CookieJarChangedCallback = Cookie -> Cookie -> IO ()
- data CookieJarChangedSignalInfo
- afterCookieJarChanged :: (IsCookieJar a, MonadIO m) => a -> CookieJarChangedCallback -> m SignalHandlerId
- genClosure_CookieJarChanged :: CookieJarChangedCallback -> IO Closure
- mk_CookieJarChangedCallback :: C_CookieJarChangedCallback -> IO (FunPtr C_CookieJarChangedCallback)
- noCookieJarChangedCallback :: Maybe CookieJarChangedCallback
- onCookieJarChanged :: (IsCookieJar a, MonadIO m) => a -> CookieJarChangedCallback -> m SignalHandlerId
- wrap_CookieJarChangedCallback :: CookieJarChangedCallback -> Ptr () -> Ptr Cookie -> Ptr Cookie -> Ptr () -> IO ()
Exported types
GObject CookieJar Source # | |
IsObject CookieJar Source # | |
IsCookieJar CookieJar Source # | |
IsSessionFeature CookieJar Source # | |
((~) * info (ResolveCookieJarMethod t CookieJar), MethodInfo * info CookieJar p) => IsLabel t (CookieJar -> p) Source # | |
((~) * info (ResolveCookieJarMethod t CookieJar), MethodInfo * info CookieJar p) => IsLabelProxy t (CookieJar -> p) Source # | |
HasAttributeList * CookieJar Source # | |
type AttributeList CookieJar Source # | |
type SignalList CookieJar Source # | |
class GObject o => IsCookieJar o Source #
toCookieJar :: IsCookieJar o => o -> IO CookieJar Source #
Methods
addCookie
data CookieJarAddCookieMethodInfo Source #
((~) * signature (Cookie -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarAddCookieMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> Cookie |
|
-> m () |
Adds cookie
to jar
, emitting the 'changed' signal if we are modifying
an existing cookie or adding a valid new cookie ('valid' means
that the cookie's expire date is not in the past).
cookie
will be 'stolen' by the jar, so don't free it afterwards.
Since: 2.26
addCookieWithFirstParty
data CookieJarAddCookieWithFirstPartyMethodInfo Source #
((~) * signature (URI -> Cookie -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarAddCookieWithFirstPartyMethodInfo a signature Source # | |
cookieJarAddCookieWithFirstParty Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> URI |
|
-> Cookie |
|
-> m () |
Adds cookie
to jar
, emitting the 'changed' signal if we are modifying
an existing cookie or adding a valid new cookie ('valid' means
that the cookie's expire date is not in the past).
firstParty
will be used to reject cookies coming from third party
resources in case such a security policy is set in the jar
.
cookie
will be 'stolen' by the jar, so don't free it afterwards.
Since: 2.40
allCookies
data CookieJarAllCookiesMethodInfo Source #
((~) * signature (m [Cookie]), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarAllCookiesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> m [Cookie] | Returns: a |
Constructs a SList
with every cookie inside the jar
.
The cookies in the list are a copy of the original, so
you have to free them when you are done with them.
Since: 2.26
deleteCookie
data CookieJarDeleteCookieMethodInfo Source #
((~) * signature (Cookie -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarDeleteCookieMethodInfo a signature Source # | |
cookieJarDeleteCookie Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> Cookie |
|
-> m () |
Deletes cookie
from jar
, emitting the 'changed' signal.
Since: 2.26
getAcceptPolicy
data CookieJarGetAcceptPolicyMethodInfo Source #
((~) * signature (m CookieJarAcceptPolicy), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarGetAcceptPolicyMethodInfo a signature Source # | |
cookieJarGetAcceptPolicy Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> m CookieJarAcceptPolicy | Returns: the |
Gets jar
's CookieJarAcceptPolicy
Since: 2.30
getCookieList
data CookieJarGetCookieListMethodInfo Source #
((~) * signature (URI -> Bool -> m [Cookie]), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarGetCookieListMethodInfo a signature Source # | |
cookieJarGetCookieList Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> URI |
|
-> Bool |
|
-> m [Cookie] | Returns: a |
Retrieves the list of cookies that would be sent with a request to uri
as a SList
of Cookie
objects.
If forHttp
is True
, the return value will include cookies marked
"HttpOnly" (that is, cookies that the server wishes to keep hidden
from client-side scripting operations such as the JavaScript
document.cookies property). Since CookieJar
sets the Cookie
header itself when making the actual HTTP request, you should
almost certainly be setting forHttp
to False
if you are calling
this.
Since: 2.40
getCookies
data CookieJarGetCookiesMethodInfo Source #
((~) * signature (URI -> Bool -> m (Maybe Text)), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarGetCookiesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> URI |
|
-> Bool |
|
-> m (Maybe Text) | Returns: the cookies, in string form, or |
Retrieves (in Cookie-header form) the list of cookies that would
be sent with a request to uri
.
If forHttp
is True
, the return value will include cookies marked
"HttpOnly" (that is, cookies that the server wishes to keep hidden
from client-side scripting operations such as the JavaScript
document.cookies property). Since CookieJar
sets the Cookie
header itself when making the actual HTTP request, you should
almost certainly be setting forHttp
to False
if you are calling
this.
Since: 2.24
isPersistent
data CookieJarIsPersistentMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarIsPersistentMethodInfo a signature Source # | |
cookieJarIsPersistent Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether jar
stores cookies persistenly.
Since: 2.40
new
:: (HasCallStack, MonadIO m) | |
=> m CookieJar | Returns: a new |
save
data CookieJarSaveMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarSaveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> m () |
Deprecated: This is a no-op.
This function exists for backward compatibility, but does not do anything any more; cookie jars are saved automatically when they are changed.
Since: 2.24
setAcceptPolicy
data CookieJarSetAcceptPolicyMethodInfo Source #
((~) * signature (CookieJarAcceptPolicy -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarSetAcceptPolicyMethodInfo a signature Source # | |
cookieJarSetAcceptPolicy Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> CookieJarAcceptPolicy |
|
-> m () |
Sets policy
as the cookie acceptance policy for jar
.
Since: 2.30
setCookie
data CookieJarSetCookieMethodInfo Source #
((~) * signature (URI -> Text -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarSetCookieMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> URI |
|
-> Text |
|
-> m () |
Adds cookie
to jar
, exactly as though it had appeared in a
Set-Cookie header returned from a request to uri
.
Keep in mind that if the CookieJarAcceptPolicy
CookieJarAcceptPolicyNoThirdParty
is set you'll need to use
cookieJarSetCookieWithFirstParty
, otherwise the jar
will have no way of knowing if the cookie is being set by a third
party or not.
Since: 2.24
setCookieWithFirstParty
data CookieJarSetCookieWithFirstPartyMethodInfo Source #
((~) * signature (URI -> URI -> Text -> m ()), MonadIO m, IsCookieJar a) => MethodInfo * CookieJarSetCookieWithFirstPartyMethodInfo a signature Source # | |
cookieJarSetCookieWithFirstParty Source #
:: (HasCallStack, MonadIO m, IsCookieJar a) | |
=> a |
|
-> URI |
|
-> URI |
|
-> Text |
|
-> m () |
Adds cookie
to jar
, exactly as though it had appeared in a
Set-Cookie header returned from a request to uri
. firstParty
will be used to reject cookies coming from third party resources in
case such a security policy is set in the jar
.
Since: 2.30
Properties
acceptPolicy
data CookieJarAcceptPolicyPropertyInfo Source #
constructCookieJarAcceptPolicy :: IsCookieJar o => CookieJarAcceptPolicy -> IO (GValueConstruct o) Source #
cookieJarAcceptPolicy :: AttrLabelProxy "acceptPolicy" Source #
getCookieJarAcceptPolicy :: (MonadIO m, IsCookieJar o) => o -> m CookieJarAcceptPolicy Source #
setCookieJarAcceptPolicy :: (MonadIO m, IsCookieJar o) => o -> CookieJarAcceptPolicy -> m () Source #
readOnly
data CookieJarReadOnlyPropertyInfo Source #
constructCookieJarReadOnly :: IsCookieJar o => Bool -> IO (GValueConstruct o) Source #
cookieJarReadOnly :: AttrLabelProxy "readOnly" Source #
getCookieJarReadOnly :: (MonadIO m, IsCookieJar o) => o -> m Bool Source #
Signals
changed
afterCookieJarChanged :: (IsCookieJar a, MonadIO m) => a -> CookieJarChangedCallback -> m SignalHandlerId Source #
mk_CookieJarChangedCallback :: C_CookieJarChangedCallback -> IO (FunPtr C_CookieJarChangedCallback) Source #
onCookieJarChanged :: (IsCookieJar a, MonadIO m) => a -> CookieJarChangedCallback -> m SignalHandlerId Source #