Skip to content

Add API point to add an event listener #89

Closed

Description

@infeo

Summary

Add an API to hand over/add an event listener to cryptofs. The event listener is bidirectional, i.e. does not only report but also returns a value. It is our decision to which events the listener is triggered (e.g. failed reading of a file, not existing directory, etc)

Problem Description

In cryptofs there are cases where it would be good to inform the caller about certain events/findings (e.g. files not belonging to the vault structure, invalid dir directories). Currently, only an error is thrown and the operation aborted or the event is logged, but otherwise ignored. From the caller perspective this is not the most desireable case, because with this you might miss (for you) important findings.

Solution

Expose in the API a method to add an eventlistener and then notify the listener on predefined events. The predefined events should be documented somewhere. For example there could be an extended method for filesystem creation, where one can hand over the event listener.

Alternatives

Collecting all occuring, not critical exceptions and then hand them over (in some way) to the caller. But this would require again some side channel.

Activity

  1. changed the title [-]Add method to add an Eventlistener for other events then warnings[/-] [+]Add API point to add an event listener.[/+] on Jan 10, 2025
  2. changed the title [-]Add API point to add an event listener.[/-] [+]Add API point to add an event listener[/+] on Jan 10, 2025
  3. added a commit that references this issue on Feb 11, 2025
    9082f02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions