X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FWebOfTrustConnector.kt;h=a407e2a04fe1b32518582f6cd7ee8421d286f8de;hp=8488f16a6f23aa55ee7925c4e5940c45c816f856;hb=HEAD;hpb=fdc8dbd38e871da0a278bded063ba9dba8af9edc diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.kt index 8488f16..a407e2a 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.kt @@ -29,6 +29,16 @@ interface WebOfTrustConnector { fun loadTrustedIdentities(ownIdentity: OwnIdentity, context: String? = null): Set /** + * Loads all identities known to the given own identity that have the (optional) given context. + * + * @param ownIdentity The own identity + * @param context The context to filter, or `null` + * @return All trusted identities + * @throws PluginException if an error occured talking to the Web of Trust plugin + */ + fun loadAllIdentities(ownIdentity: OwnIdentity, context: String? = null): Set + + /** * Adds the given context to the given identity. * * @param ownIdentity The identity to add the context to @@ -70,41 +80,6 @@ interface WebOfTrustConnector { fun removeProperty(ownIdentity: OwnIdentity, name: String) /** - * Returns the trust for the given identity assigned to it by the given own - * identity. - * - * @param ownIdentity The own identity - * @param identity The identity to get the trust for - * @return The trust for the given identity - * @throws PluginException if an error occured talking to the Web of Trust plugin - */ - @Throws(PluginException::class) - fun getTrust(ownIdentity: OwnIdentity, identity: Identity): Trust - - /** - * Sets the trust for the given identity. - * - * @param ownIdentity The trusting identity - * @param identity The trusted identity - * @param trust The amount of trust (-100 thru 100) - * @param comment The comment or explanation of the trust value - * @throws PluginException if an error occured talking to the Web of Trust plugin - */ - @Throws(PluginException::class) - fun setTrust(ownIdentity: OwnIdentity, identity: Identity, trust: Int, comment: String) - - /** - * Removes any trust assignment of the given own identity for the given - * identity. - * - * @param ownIdentity The own identity - * @param identity The identity to remove all trust for - * @throws WebOfTrustException if an error occurs - */ - @Throws(WebOfTrustException::class) - fun removeTrust(ownIdentity: OwnIdentity, identity: Identity) - - /** * Pings the Web of Trust plugin. If the plugin can not be reached, a * [PluginException] is thrown. *