-
Notifications
You must be signed in to change notification settings - Fork 663
Overlay Icons
There are two basic types of OLI: Icons to display the sharing state and icons to visualize the sync state. This is explained in the documentation.
Original specification: #1743 and #1818
This page is to summarize the technical specification, for discussion, errors and stuff please use the issue tracker with the according issues.
To display OLI there are 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:
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.
- SYNC: The file or folder is currently syncing or scheduled to be synced
- IGNORE: The file or folder is ignored
- OK: The file or folder is properly synced
- ERROR: There is a sync error
- NEW: Obsolete, same as SYNC
- NONE: Obsolete, same as NOP
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:
-
Update View: The Shell should update the current view. This happens after the sync state of a folder changed.
The ownCloud client sends:
UPDATE_VIEW\n
FIXME: Legacy, this shouldn't be necessary since all file statuses are now reliably pushed and plugins should try to update as soon as possible while trying not to update the view on each status (e.g. using an update timer)
-
Status push: The sync client determined that a file changes status, the shell should show this new information.
The ownCloud client sends:
STATUS:<OK|ERROR|SYNC>:<filename>\n
to indicate the new status.
-
New folder registration: The plugin should start showing icons and requesting status in a folder and all its files. This also happens when the sync is paused or the account disconnected.
To register, the ownCloud client sends:
REGISTER_PATH:<folder_root>\n
To unregister, the ownCloud client sends:
UNREGISTER_PATH:<folder_root>\n
☁️