GUPnP.Acl¶
- Implementations:
None
Methods¶
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class GUPnP.Acl¶
- Bases:
- Structure:
Access control provider for [class`GUPnP`.Context]
GUPnP.Aclprovides either synchronous or asynchronous functions to check whether a peer should be able to access a resource that is hosted by GUPnP or not.New in version 0.20.11.
- can_sync()¶
- Return type:
Check whether [method`GUPnP`.Acl.is_allowed_async] is supported.
New in version 0.20.11.
- is_allowed(device, service, path, address, agent)¶
- Parameters:
device (
GUPnP.DeviceorNone) – The [class`GUPnP`.Device] associated with path orNoneif unknown.service (
GUPnP.ServiceorNone) – The [class`GUPnP`.Service] associated with path orNoneif unknown.path (
str) – The path being served.address (
str) – IP address of the peer.agent (
strorNone) – The User-Agent header of the peer orNoneif unknown. returnsTrueif the peer is allowed,Falseotherwise
- Return type:
Check whether an IP address is allowed to access this resource.
New in version 0.20.11.
- is_allowed_async(device, service, path, address, agent, cancellable, callback, *user_data)¶
- Parameters:
device (
GUPnP.DeviceorNone) – The [class`GUPnP`.Device] associated with path orNoneif unknown.service (
GUPnP.ServiceorNone) – The [class`GUPnP`.Service] associated with path orNoneif unknown.path (
str) – The path being served.address (
str) – IP address of the peeragent (
strorNone) – The User-Agent header of the peer orNoneif not unknown.cancellable (
Gio.CancellableorNone) – A cancellable which can be used to cancel the operation.callback (
Gio.AsyncReadyCallbackorNone) – Callback to call after the function is done.
Check asynchronously whether an IP address is allowed to access this resource.
This function is optional. [method`GUPnP`.Acl.can_sync] should return
Trueif the implementing class supports it. If it is supported, GUPnP will prefer to use this function over [method`GUPnP`.Acl.is_allowed].Implement this function if the process of verifying the access right is expected to take some time, for example when using D-Bus etc.
Use [method`GUPnP`.Acl.is_allowed_finish] to retrieve the result.
New in version 0.20.11.
- is_allowed_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – [iface`Gio`.AsyncResult] obtained from the callback passed to [method`GUPnP`.Acl.is_allowed_async]- Raises:
- Return type:
Get the result of [method`GUPnP`.Acl.is_allowed_async].
New in version 0.20.11.
- do_can_sync() virtual¶
- Return type:
Check whether [method`GUPnP`.Acl.is_allowed_async] is supported.
New in version 0.20.11.
- do_is_allowed(device, service, path, address, agent) virtual¶
- Parameters:
device (
GUPnP.DeviceorNone) – The [class`GUPnP`.Device] associated with path orNoneif unknown.service (
GUPnP.ServiceorNone) – The [class`GUPnP`.Service] associated with path orNoneif unknown.path (
str) – The path being served.address (
str) – IP address of the peer.agent (
strorNone) – The User-Agent header of the peer orNoneif unknown. returnsTrueif the peer is allowed,Falseotherwise
- Return type:
Check whether an IP address is allowed to access this resource.
New in version 0.20.11.
- do_is_allowed_async(device, service, path, address, agent, cancellable, callback, *user_data) virtual¶
- Parameters:
device (
GUPnP.DeviceorNone) – The [class`GUPnP`.Device] associated with path orNoneif unknown.service (
GUPnP.ServiceorNone) – The [class`GUPnP`.Service] associated with path orNoneif unknown.path (
str) – The path being served.address (
str) – IP address of the peeragent (
strorNone) – The User-Agent header of the peer orNoneif not unknown.cancellable (
Gio.CancellableorNone) – A cancellable which can be used to cancel the operation.callback (
Gio.AsyncReadyCallbackorNone) – Callback to call after the function is done.
Check asynchronously whether an IP address is allowed to access this resource.
This function is optional. [method`GUPnP`.Acl.can_sync] should return
Trueif the implementing class supports it. If it is supported, GUPnP will prefer to use this function over [method`GUPnP`.Acl.is_allowed].Implement this function if the process of verifying the access right is expected to take some time, for example when using D-Bus etc.
Use [method`GUPnP`.Acl.is_allowed_finish] to retrieve the result.
New in version 0.20.11.
- do_is_allowed_finish(res) virtual¶
- Parameters:
res (
Gio.AsyncResult) – [iface`Gio`.AsyncResult] obtained from the callback passed to [method`GUPnP`.Acl.is_allowed_async]- Return type:
Get the result of [method`GUPnP`.Acl.is_allowed_async].
New in version 0.20.11.