SolidSharingClient
Client SDK for the Solid resource-sharing feature: create, list and revoke shares of pod resources, track shares received from others, browse an owner's catalog, and accept or reject access requests.
Sharing is enforced by the pod's access control (Web Access Control, or Access Control Policy on servers that use it). Calls are delegated over IPC to the Android Solid Services app.
Obtain an instance via Solid.getSharingClient. Collect connectionState and wait for true before issuing calls. All operations are suspend functions and throw SolidException on failure.
Functions
Approves an incoming share request. Equivalent to creating the requested share — the requester gets an as:Offer informing them of the grant.
Starts tracking access to resourceUri that was shared with this user (e.g. after scanning a QR code or opening a share link), verifying access first. Returns the received share, or null if access can't be verified.
Hot Flow of the IPC service connection state; emits true once connected.
Grants receiver access of mode on resourceUri and records it in the given-shares index. For a container, members inherit the access. When notifyReceiver is true and receiver is a WebID, a best-effort notification is delivered to their inbox. Returns the created share.
Returns every observable access relationship for webId — shares given, shares received, incoming requests, and any grants discovered through Solid Application Interoperability (SAI) registries — unified into one list.
Returns the shares affecting resourceUri, read directly from that resource's ACL (authoritative).
Reads ownerWebId's public catalog from viewerWebId's perspective — used to browse what an owner accepts access requests for.
Returns the shares this user has given, read from the on-pod index (fast). Re-validate with refreshGivenShares.
Returns the shares this user has received, from the local index (fast). Re-validate with refreshReceivedShares.
Strips every share from resourceUri, leaving it owner-only.
Adds or replaces entry in this user's public catalog of resources that others may request access to. The catalog is public; the listed resources stay private until access is granted.
Drops the given-shares index rows of a deleted resourceUri — and, with includeDescendants, of everything beneath it — without touching access control. Call it after deleting a resource so its bookkeeping does not outlive it. Returns the removed rows; notifyReceivers additionally sends each WebID receiver an as:Undo.
Rebuilds the given-shares index by walking the pod and reading each resource's ACL. Expensive — expose as an explicit user action, not a routine refresh. Returns the rebuilt list.
Re-validates each given share against the resource's live ACL, drops entries no longer granted, and returns the verified list.
Re-validates each received share and drops entries that are no longer accessible.
Declines an incoming share request by posting an as:Reject to the requester's inbox. Does not create any share.
Removes the catalog entry for resourceUri, if present.
Stops tracking a received share. Does not affect the resource itself.
Re-asserts the owner's acl:Control on a resource whose ACL lost it — the repair for a pod that dropped the owner rule and left the resource un-manageable.
Removes receiver's access to resourceUri and the matching index entry. If receiver is a WebID, a best-effort withdrawal notification is sent.
Reconciles the received-shares index against inbox notifications: an Offer/Accept adds a row, an Undo removes one. Returns the reconciled index.
Changes the access mode of an existing share for receiver on resourceUri. resourceType / resourceName refresh the typed-share marks as on createShare.