Skip to content

Overlay Icons

Markus Goetz edited this page Aug 28, 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
  • SYNC: The file or folder is modified and needs to be synced
  • NEW: The file is new and not yet synced
  • IGNORE: The file or folder is ignored
  • OK: The file or folder is properly synced
  • ERROR: There is a sync error

If the file is shared with the user, the status string is appended by a "+SWM" for Shared With Me.

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: STATUS:<OK|ERROR|SYNC>:<filename>

    to indicate the jobs result as ok or error.

FIXMEs:

  • The shared status must be and additional flag, that means: The file has a sync state AND a share state.