AccessProbe

sealed interface AccessProbe : Parcelable

The outcome of a probeAccess call: what access the current user effectively holds on a resource, read from its WAC-Allow response header.

Note the third state — "couldn't determine" — is not modelled here: it is a com.erfangholami.androidsolidservices.shared.result.SolidResult.Failure on the probe (a 401 blip, 5xx, or transport error), so a caller must not mistake it for Denied. Only Accessible and Denied are authoritative answers.

Lives in shared (and is Parcelable) because the probe is offered by both the in-process API and the IPC surface, and both must speak the same type.

The Parcelable plumbing is hand-written rather than @Parcelized: this is a sealed hierarchy, so each variant has to stamp a discriminator that the single CREATOR on the parent reads back to reconstruct the right subtype.

Inheritors

Types

Link copied to clipboard
data class Accessible(val modes: Set<ShareMode>, val ownerWebId: String?) : AccessProbe

The resource is reachable and the user holds modes (a subset of View/Add/Edit — i.e. Read/Append/Write). ownerWebId is the resource's solid:owner, or null when the server does not advertise one.

Link copied to clipboard
object Companion
Link copied to clipboard
data object Denied : AccessProbe

The resource exists but access is denied (403), or it does not exist (404).

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)