-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
170 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Logging | ||
|
||
For usage related information, see [logging usage](../Usage/Logging.md). | ||
|
||
The `logging` modules are used for sending log events to the peer. | ||
|
||
It is generally used for sending client log messages to the server, | ||
but it can also be used in the opposite direction. | ||
|
||
## Implementations | ||
|
||
| Component | Link | | ||
|-------------------|---------------------------------------------------------------------------------| | ||
| client | [xpra.client.mixins.remote_logging](../../xpra/client/mixins/remote_logging.py) | | ||
| client connection | none | | ||
| server | [xpra.server.mixins.logging](../../xpra/server/mixins/logging.py) | | ||
|
||
|
||
## Capabilities | ||
|
||
The server exposes two flags using the `remote-logging` capability prefix: | ||
* `receive` if the server is able to receive log events from the client | ||
* `send` if the server is able to send its log events to the client | ||
|
||
## Network Packets | ||
|
||
| Packet Type | Arguments | Direction | | ||
|-------------------|----------------------------------------------------------------------------------|------------------| | ||
| `logging` | `level` : integer<br/>`message` : string or list of strings<br/>`time` : integer | both | | ||
| `logging-control` | `action` : string, only either `start` or `stop` | client to server | | ||
|
||
The `logging` packets can be sent to the server if it exposes the `receive` capability, | ||
or sent from the server to the client following a `start` `logging-control` request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
# MMAP | ||
|
||
TBD | ||
The `mmap` modules are used for fast memory transfers | ||
between client and server when both reside on the same host. | ||
|
||
## Implementations | ||
|
||
| Component | Link | | ||
|-------------------|-------------------------------------------------------------| | ||
| client | [xpra.client.mixins.mmap](../../xpra/client/mixins/mmap.py) | | ||
| client connection | [xpra.server.source.mmap](../../xpra/server/source/mmap.py) | | ||
| server | [xpra.server.mixins.mmap](../../xpra/server/mixins/mmap.py) | | ||
|
||
|
||
## Capabilities | ||
|
||
The client and server should expose the following capabilities in their `hello` packet | ||
using the `clipboard` prefix. | ||
|
||
The client creates an `mmap` backing file, | ||
writes a random token at a random position within this mmap area | ||
and sends the following capabilities: | ||
|
||
| Capability | Value | | ||
|---------------|--------------------------------------| | ||
| `file` | path to the mmap backing file | | ||
| `size` | size of the mmap area | | ||
| `token` | random token value generated | | ||
| `token_index` | position where the token was written | | ||
| `token_bytes` | length of the token in bytes | | ||
|
||
The server should attempt to open the mmap file specified, | ||
and verify that the token is found. | ||
|
||
To use this mmap file, it must write a new token | ||
and return this information to the client. | ||
(using the same format, excluding the `file` and `size` that the client has already specified) | ||
|
||
The client then verifies that the mmap file can be used bi-directionally. | ||
|
||
|
||
## Network Packets | ||
|
||
There are no specific `mmap` packets used, `mmap` is used as an [encoding](../Usage/Encodings.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Notifications | ||
|
||
For usage related information, see [notitications feature](../Features/Notifications.md). | ||
|
||
|
||
## Implementations | ||
|
||
| Component | Link | | ||
|-------------------|-------------------------------------------------------------------------------| | ||
| client | [xpra.client.mixins.notifications](../../xpra/client/mixins/notifications.py) | | ||
| client connection | [xpra.server.source.notification](../../xpra/server/source/notification.py) | | ||
| server | [xpra.server.mixins.notification](../../xpra/server/mixins/notification.py) | | ||
|
||
|
||
## Capabilities | ||
|
||
The server exposes a single `enabled` flag using the `notifications` capability prefix. | ||
|
||
|
||
## Network Packets | ||
|
||
| Packet Type | Arguments | Direction | | ||
|------------------------|------------------------------------------------------------------|------------------| | ||
| `notify_show` | notification data (see below) | server to client | | ||
| `notify_close` | `notification id` : integer | server to client | | ||
| `notification-close` | `notification id` : integer, `reason` : integer, `text` : string | client to server | | ||
| `notification-action` | `notification id` : integer, `action_key` : integer | client to server | | ||
| `set-notify` | `enabled` : boolean | client to server | | ||
|
||
|
||
### Notification data | ||
|
||
| Argument | Type | Notes | | ||
|-----------------------------|-------------------------|----------------------------------| | ||
| `dbus_id` | `integer` | 0 if unused | | ||
| `notification id` | `integer` | should be unique | | ||
| `applciation name` | `string` | | | ||
| `replaced notification id` | `integer` | 0 if unused | | ||
| `application icon` | `string` | the name of the icon to show | | ||
| `summary` | `string` | the title of the notification | | ||
| `body` | `string` | the contents of the notification | | ||
| `timeout` | `integer` | in seconds, zero if unused | | ||
| `icon data` | `list` (optional) | the icon data to use, see below | | ||
| `actions` | `list` (optional) | see below | | ||
| `hints` | `dictionary` (optional) | see below | | ||
|
||
### Notification Icon | ||
|
||
The icon data is a list or tuple with 4 elements: | ||
|
||
| Argument | Type | | ||
|----------|-----------| | ||
| `format` | `string` | | ||
| `width` | `integer` | | ||
| `height` | `integer` | | ||
| `data` | `bytes` | | ||
|
||
The only format which is guaranteed to be supported is `png`. | ||
Other formats should not be used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
# Subsystems | ||
|
||
This documentation refers to individual features, | ||
it links to the implementation and technical documentation of each subsystem. | ||
This documentation refers to individual protocol features, | ||
it links to the implementation and technical documentation for each subsystem. | ||
|
||
Most modules are optional, see [security considerations](../Usage/Security.md). | ||
|
||
| Subsystem | [Client Module](../../xpra/client/mixins/) | [Server Module](../../xpra/server/mixins) | [Client Connection Module](../../xpra/server/source/) | | ||
|-----------------------------|----------------------------------------------------|----------------------------------------------------|------------------------------------------------------------------| | ||
| [Audio](./Audio.md) | [clipboard](../../xpra/client/mixins/audio.py) | [audio](../../xpra/server/mixins/audio.py) | [audio](../../xpra/server/source/audio.py) | | ||
| [Clipboard](./Clipboard.md) | [clipboard](../../xpra/client/mixins/clipboard.py) | [clipboard](../../xpra/server/mixins/clipboard.py) | [clipboard](../../xpra/server/source/clipboard.py) | | ||
|
||
* Client Module: feature implementation loaded by the client, it interfaces with the corresponding "Client Connection Module" on the server side | ||
* Client Connection Module: for each connection to a client, the server will instantiate this module | ||
* Server Module: feature implemented by the server, it may interact with multiple "Client Connection Modules" | ||
|
||
| Subsystem | [Client Module](../../xpra/client/mixins/) | [Server Module](../../xpra/server/mixins) | [Client Connection Module](../../xpra/server/source/) | User Documentation | | ||
|-------------------------------------|--------------------------------------------------------------|----------------------------------------------------|----------------------------------------------------------|---------------------------------------------------------| | ||
| [Audio](./Audio.md) | [audio](../../xpra/client/mixins/audio.py) | [audio](../../xpra/server/mixins/audio.py) | [audio](../../xpra/server/source/audio.py) | [audio feature](../Features/Audio.md) | | ||
| [Clipboard](./Clipboard.md) | [clipboard](../../xpra/client/mixins/clipboard.py) | [clipboard](../../xpra/server/mixins/clipboard.py) | [clipboard](../../xpra/server/source/clipboard.py) | [clipboard feature](../Features/Clipboard.md) | | ||
| [MMAP](./MMAP.md) | [mmap](../../xpra/client/mixins/mmap.py) | [mmap](../../xpra/server/mixins/mmap.py) | [mmap](../../xpra/server/source/mmap.py) | enabled automatically | | ||
| [Logging](./Logging.md) | [remote-logging](../../xpra/client/mixins/remote_logging.py) | [logging](../../xpra/server/mixins/logging.py) | none | [logging usage](../Usage/Logging.md) | | ||
| [Notifications](./Notifications.md) | [notifications](../../xpra/client/mixins/notifications.py) | [logging](../../xpra/server/mixins/notification.py) | [notification](../../xpra/server/source/notification.py) | [notifications feature](../Features/Notifications.md) | |