Skip to content

Overlay Icons

Klaas Freitag edited this page Jun 30, 2014 · 8 revisions

One of the next major features of the sync client will be overlay icons (OLI).

There will be two basic types of OLI: Icons to display the sharing state (see mirall https://github.com/owncloud/mirall/issues/1743 ) and icons to visualize the sync state (see https://github.com/owncloud/mirall/issues/1818 ).

This page is to summarize the technical specification, for discussion, errors and stuff please use the issue tracker with the according issues.

Technical details:

To display OLI there will be plugins in the "Shells", ie. Nautilus, Dolphin, Finder and Explorer. The plugins need to communicate to Mirall to get information about the either sync- or share state of the files the shell should display.

For the inter process communication between shell and Mirall we use a simple socket protocol. Mirall acts as a server, and the plugins will connect to that server.

The following protocol is defined:

  1. Shell sends RETRIEVE_FOLDER_STATUS:<foldername>\n Mirall sends STATUS:<statusString>:<foldername>\n

    This returns the recursive sync state of the folder. If the folder is not synced, NOP is returned.

  2. Shell sends RETRIEVE_FILE_STATUS:<filename>\n Mirall sends STATUS:<statusString>:<foldername>\n

    This returns the sync state of the file. If the file is not synced, NOP is returned.

where statusString is one of

  • NOP: Folder either does not exist or nothing is to be displayed because the client is offline for example.
  • NONE: the file or folder status is "NONE", should not happen
  • NEED_SYNC: The file or folder is new and needs to be synced
  • IGNORE: The file or folder is ignored
  • OK: The file or folder is properly synced
  • ERROR: There is a sync error
  • SHARED: The file is shared.

Apart from these Shell-to-Mirall initiated messages, there are some messages Mirall can broadcast one way to the shells:

  1. Update View: The Shell should update the current view. This happens after the sync state of a folder changed.

    Mirall sends: UPDATE_VIEW\n

    FIXME: should we pass the root folder of the folder which changed to let the plugin decide if it really wants to update the view?

  2. Propagate Job finished: The propagation (ie. upload, download etc) of a specific file is finished.

    Mirall sends: BROADCAST:<OK|ERROR>:<filename>

    to indicate the jobs result as ok or error.

FIXMEs:

  • Unify message format, ie. BROADCAST keyword yes/no
  • The shared status must be and additional flag, that means: The file has a sync state AND a share state.