Interface

GUPnP-1.6GUPnPAclInterface

Interface for implementing Acl. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_can_sync(): boolean;
    vfunc_is_allowed(
        device: any,
        service: any,
        path: string,
        address: string,
        agent: string | null,
    ): boolean;
    vfunc_is_allowed_async(
        device: any,
        service: any,
        path: string,
        address: string,
        agent: string | null,
        cancellable: Gio.Cancellable | null,
        callback: AsyncReadyCallback<GUPnP.Acl.Interface> | null,
    ): void;
    vfunc_is_allowed_finish(res: Gio.AsyncResult): boolean;
}

Hierarchy (View Summary)

Index

Methods

  • Check whether an IP address is allowed to access this resource.

    Parameters

    • device: any

      The GUPnP.Device associated with path or null if unknown.

    • service: any

      The GUPnP.Service associated with path or null if unknown.

    • path: string

      The path being served.

    • address: string

      IP address of the peer.

    • agent: string | null

      The User-Agent header of the peer or null if unknown. returns true if the peer is allowed, false otherwise

    Returns boolean

  • Check asynchronously whether an IP address is allowed to access this resource.

    This function is optional. GUPnP.Acl.can_sync should return true if the implementing class supports it. If it is supported, GUPnP will prefer to use this function over 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 GUPnP.Acl.is_allowed_finish to retrieve the result.

    Parameters

    • device: any

      The GUPnP.Device associated with path or null if unknown.

    • service: any

      The GUPnP.Service associated with path or null if unknown.

    • path: string

      The path being served.

    • address: string

      IP address of the peer

    • agent: string | null

      The User-Agent header of the peer or null if not unknown.

    • cancellable: Gio.Cancellable | null

      A cancellable which can be used to cancel the operation.

    • callback: AsyncReadyCallback<GUPnP.Acl.Interface> | null

      Callback to call after the function is done.

    Returns void