Skip to content

Commit

Permalink
rpcmethods: map out combinations of methods for property and file nodes
Browse files Browse the repository at this point in the history
The file and property nodes have optional features that are provided by
additional methods. By providing them on that node these features
combined provide a different types of nodes. This maps out combinations
and provides names to them.
  • Loading branch information
Cynerd committed May 15, 2024
1 parent e523729 commit 738ba91
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/rpcmethods/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ method definition in this standard). That is because sometimes you want to allow
a different levels of access to different users to same file (such as append to
regular user, while write and truncate to super users).

The combination of provided method for file node will define the expected
functionality of the file. For the convinience of reader the following table is
provided with various, but not all, types of file node modes. The methods
`*:stat`, and `*:size` are always provided.

| | `*:crc` / `*:sha1` | `*:read` | `*:write` | `*:truncate` | `*:append` |
|-------------|--------------------|----------|-----------|--------------|------------|
| Read only | ✔️ | ✔️ ||||
| Fixed size | ✔️ | ✔️ | ✔️ |||
| Resizable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Append only | ✔️ | ✔️ ||| ✔️ |

## `*:stat`

| Name | SHV Path | Flags | Access |
Expand Down Expand Up @@ -167,7 +179,7 @@ zero length bytes value is provided.
| `write` | Any | | Write |

Write is optional method that can be provided if modification of the file over
SHV RCP is allowed.
SHV RPC is allowed.

| Parameter | Result |
|--------------|--------|
Expand Down
10 changes: 10 additions & 0 deletions src/rpcmethods/property.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Property node is a convention where we associate value storage with some SHV
path. The value can be received, optionally modified and its change can be
signaled.

The type of the property depends on the presence of the methods. The following
table

| | `*:get` | `*:get:*chng` | `*:set` |
|---------------------------------|---------|---------------|---------|
| Read only | ✔️ |||
| Read only with signaled change | ✔️ | ✔️ ||
| Read-write | ✔️ || ✔️ |
| Read-write with signaled change | ✔️ | ✔️ | ✔️ |

## `*:get`

| Name | SHV Path | Flags | Access |
Expand Down

0 comments on commit 738ba91

Please sign in to comment.