mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 01:03:14 +02:00
doc: use a single line for some object examples (relay protocol)
This commit is contained in:
@@ -2511,13 +2511,9 @@ A _hdata_ contains a path with hdata names, list of keys, number of set of
|
||||
objects, and then set of objects (path with pointers, then objects).
|
||||
|
||||
....
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥──
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ...
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨──
|
||||
|
||||
──╥────────┬─────────────────────╥─────┐
|
||||
... ║ p-path │ value 1 ... value N ║ ... │
|
||||
──╨────────┴─────────────────────╨─────┘
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥─────╥────────┬─────────────────────╥─────┐
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ... ║ p-path │ value 1 ... value N ║ ... │
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨─────╨────────┴─────────────────────╨─────┘
|
||||
....
|
||||
|
||||
* _h-path_ (string): path used to reach hdata (example:
|
||||
@@ -2538,17 +2534,11 @@ keys (_number_ and _full_name_):
|
||||
hdata buffer:gui_buffers(*) number,full_name
|
||||
|
||||
# response
|
||||
┌────────┬──────────────────────────┬───╥──
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ ...
|
||||
└────────┴──────────────────────────┴───╨──
|
||||
└──────┘ └────────────────────────┘ └─┘
|
||||
h-path keys count
|
||||
|
||||
──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐
|
||||
... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │
|
||||
──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘
|
||||
└──────────────────────────┘ └────────────────────────────────┘
|
||||
buffer 1 buffer 2
|
||||
┌────────┬──────────────────────────┬───╥─────────┬───┬──────────────╥─────────┬───┬─────────────────────┐
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │ irc.server.freenode │
|
||||
└────────┴──────────────────────────┴───╨─────────┴───┴──────────────╨─────────┴───┴─────────────────────┘
|
||||
└──────┘ └────────────────────────┘ └─┘ └──────────────────────────┘ └─────────────────────────────────┘
|
||||
h-path keys count buffer 1 buffer 2
|
||||
....
|
||||
|
||||
Example of hdata with lines of core buffer:
|
||||
@@ -2696,17 +2686,11 @@ Example of infolist with two buffers (weechat core and freenode server):
|
||||
infolist buffer
|
||||
|
||||
# response
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥──
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ ...
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨──
|
||||
└──────┘ └─┘ └──────────────────────────────────┘
|
||||
name count item 1
|
||||
|
||||
──╥────┬─────────┬─────┬─────────┬─────┐
|
||||
... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
──╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────────────────────────────────┘
|
||||
item 2
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥────┬─────────┬─────┬─────────┬─────┐
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────┘ └─┘ └──────────────────────────────────┘ └──────────────────────────────────┘
|
||||
name count item 1 item 2
|
||||
....
|
||||
|
||||
[[object_array]]
|
||||
@@ -2717,33 +2701,21 @@ An array is a type (3 bytes) + number of objects (integer on 4 bytes) + data.
|
||||
Example of array with two strings:
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type number of strings length
|
||||
|
||||
──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└────────────┘ └─────────────────┘ └───────┘
|
||||
'a' 'b' 'c' length 'd' 'e'
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └────────────┘ └─────────────────┘ └───────┘
|
||||
type number of strings length 'a' 'b' 'c' length 'd' 'e'
|
||||
....
|
||||
|
||||
Example of array with three integers:
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type number of integers 123 (0x7B)
|
||||
|
||||
──╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
──╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└─────────────────┘ └─────────────────┘
|
||||
456 (0x1C8) 789 (0x315)
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
||||
type number of integers 123 (0x7B) 456 (0x1C8) 789 (0x315)
|
||||
....
|
||||
|
||||
A _NULL_ array:
|
||||
|
||||
@@ -2547,13 +2547,9 @@ nombre d'objets, et l'ensemble des objets (chemin avec les pointeurs, puis les
|
||||
objets).
|
||||
|
||||
....
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥──
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ...
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨──
|
||||
|
||||
──╥────────┬─────────────────────╥─────┐
|
||||
... ║ p-path │ value 1 ... value N ║ ... │
|
||||
──╨────────┴─────────────────────╨─────┘
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥────────┬─────────────────────╥─────┐
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ p-path │ value 1 ... value N ║ ... │
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨────────┴─────────────────────╨─────┘
|
||||
....
|
||||
|
||||
* _h-path_ (chaîne) : chemin utilise pour atteindre le hdata (exemple :
|
||||
@@ -2575,17 +2571,11 @@ freenode) et deux clés (_number_ et _full_name_) :
|
||||
hdata buffer:gui_buffers(*) number,full_name
|
||||
|
||||
# réponse
|
||||
┌────────┬──────────────────────────┬───╥──
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ ...
|
||||
└────────┴──────────────────────────┴───╨──
|
||||
└──────┘ └────────────────────────┘ └─┘
|
||||
h-path clés nombre
|
||||
|
||||
──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐
|
||||
... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │
|
||||
──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘
|
||||
└──────────────────────────┘ └────────────────────────────────┘
|
||||
tampon 1 tampon 2
|
||||
┌────────┬──────────────────────────┬───╥─────────┬───┬──────────────╥─────────┬───┬─────────────────────┐
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │ irc.server.freenode │
|
||||
└────────┴──────────────────────────┴───╨─────────┴───┴──────────────╨─────────┴───┴─────────────────────┘
|
||||
└──────┘ └────────────────────────┘ └─┘ └──────────────────────────┘ └────────────────────────────────┘
|
||||
h-path clés nombre tampon 1 tampon 2
|
||||
....
|
||||
|
||||
Exemple de hdata avec les lignes du tampon "core" :
|
||||
@@ -2735,17 +2725,11 @@ freenode) :
|
||||
infolist buffer
|
||||
|
||||
# réponse
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥──
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ ...
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨──
|
||||
└──────┘ └─┘ └──────────────────────────────────┘
|
||||
nom nombre élément 1
|
||||
|
||||
──╥────┬─────────┬─────┬─────────┬─────┐
|
||||
... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
──╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────────────────────────────────┘
|
||||
élément 2
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥────┬─────────┬─────┬─────────┬─────┐
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────┘ └─┘ └──────────────────────────────────┘ └──────────────────────────────────┘
|
||||
nom nombre élément 1 élément 2
|
||||
....
|
||||
|
||||
[[object_array]]
|
||||
@@ -2757,33 +2741,21 @@ données.
|
||||
Exemple de tableau avec deux chaînes de caractères :
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type nombre de chaînes longueur
|
||||
|
||||
──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└────────────┘ └─────────────────┘ └───────┘
|
||||
'a' 'b' 'c' longueur 'd' 'e'
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └────────────┘ └─────────────────┘ └───────┘
|
||||
type nombre de chaînes longueur 'a' 'b' 'c' longueur 'd' 'e'
|
||||
....
|
||||
|
||||
Exemple de tableau avec trois entiers :
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type nombre d'entiers 123 (0x7B)
|
||||
|
||||
──╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
──╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└─────────────────┘ └─────────────────┘
|
||||
456 (0x1C8) 789 (0x315)
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
||||
type nombre d'entiers 123 (0x7B) 456 (0x1C8) 789 (0x315)
|
||||
....
|
||||
|
||||
Un tableau _NULL_ :
|
||||
|
||||
@@ -2534,13 +2534,9 @@ length '1' '3' '2' '1' '9' '9' '3' '4' '5' '6'
|
||||
(ポインタのパス、オブジェクト) が含まれています。
|
||||
|
||||
....
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥──
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ...
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨──
|
||||
|
||||
──╥────────┬─────────────────────╥─────┐
|
||||
... ║ p-path │ value 1 ... value N ║ ... │
|
||||
──╨────────┴─────────────────────╨─────┘
|
||||
┌────────┬──────┬───────╥────────┬─────────────────────╥─────╥────────┬─────────────────────╥─────┐
|
||||
│ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ... ║ p-path │ value 1 ... value N ║ ... │
|
||||
└────────┴──────┴───────╨────────┴─────────────────────╨─────╨────────┴─────────────────────╨─────┘
|
||||
....
|
||||
|
||||
* _h-path_ (文字列): hdata にアクセスする際に使うパス (例:
|
||||
@@ -2561,17 +2557,11 @@ length '1' '3' '2' '1' '9' '9' '3' '4' '5' '6'
|
||||
hdata buffer:gui_buffers(*) number,full_name
|
||||
|
||||
# 応答
|
||||
┌────────┬──────────────────────────┬───╥──
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ ...
|
||||
└────────┴──────────────────────────┴───╨──
|
||||
└──────┘ └────────────────────────┘ └─┘
|
||||
h-path keys count
|
||||
|
||||
──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐
|
||||
... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │
|
||||
──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘
|
||||
└──────────────────────────┘ └────────────────────────────────┘
|
||||
buffer 1 buffer 2
|
||||
┌────────┬──────────────────────────┬───╥─────────┬───┬──────────────╥─────────┬───┬─────────────────────┐
|
||||
│ buffer │ number:int,full_name:str │ 2 ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │ irc.server.freenode │
|
||||
└────────┴──────────────────────────┴───╨─────────┴───┴──────────────╨─────────┴───┴─────────────────────┘
|
||||
└──────┘ └────────────────────────┘ └─┘ └──────────────────────────┘ └─────────────────────────────────┘
|
||||
h-path keys count buffer 1 buffer 2
|
||||
....
|
||||
|
||||
コアバッファの行を含む hdata の例:
|
||||
@@ -2719,17 +2709,11 @@ _version_ インフォの例:
|
||||
infolist buffer
|
||||
|
||||
# 応答
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥──
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ ...
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨──
|
||||
└──────┘ └─┘ └──────────────────────────────────┘
|
||||
name count item 1
|
||||
|
||||
──╥────┬─────────┬─────┬─────────┬─────┐
|
||||
... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
──╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────────────────────────────────┘
|
||||
item 2
|
||||
┌────────┬───╥────┬─────────┬─────┬─────────┬─────╥────┬─────────┬─────┬─────────┬─────┐
|
||||
│ buffer │ 2 ║ 42 │ pointer │ ptr │ 0x12345 │ ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │
|
||||
└────────┴───╨────┴─────────┴─────┴─────────┴─────╨────┴─────────┴─────┴─────────┴─────┘
|
||||
└──────┘ └─┘ └──────────────────────────────────┘ └──────────────────────────────────┘
|
||||
name count item 1 item 2
|
||||
....
|
||||
|
||||
[[object_array]]
|
||||
@@ -2740,33 +2724,21 @@ infolist buffer
|
||||
2 つの文字列を持つ配列の例:
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type number of strings length
|
||||
|
||||
──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└────────────┘ └─────────────────┘ └───────┘
|
||||
'a' 'b' 'c' length 'd' 'e'
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────╥────┬────┬────┬────╥────┬────┐
|
||||
│ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► [ "abc", "de" ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────╨────┴────┴────┴────╨────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └────────────┘ └─────────────────┘ └───────┘
|
||||
type number of strings length 'a' 'b' 'c' length 'd' 'e'
|
||||
....
|
||||
|
||||
3 つの整数を持つ配列の例:
|
||||
|
||||
....
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥──
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ ...
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨──
|
||||
└───┘ └─────────────────┘ └─────────────────┘
|
||||
type number of integers 123 (0x7B)
|
||||
|
||||
──╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
──╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└─────────────────┘ └─────────────────┘
|
||||
456 (0x1C8) 789 (0x315)
|
||||
┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────╥────┬────┬────┬────┐
|
||||
│ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► [ 123, 456, 789 ]
|
||||
└─────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────╨────┴────┴────┴────┘
|
||||
└───┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
||||
type number of integers 123 (0x7B) 456 (0x1C8) 789 (0x315)
|
||||
....
|
||||
|
||||
_NULL_ 配列:
|
||||
|
||||
Reference in New Issue
Block a user