1/2 from #1415
[far2l.git] / NetRocks / HACKING.txt
blobaddc5a23f0bb164542cf42c9de9d1c55563dcfe5
1 Architecture overview:
3        /----------[PluginImpl]----{shared_ptr or temporary}----\       [g_background_tasks]
4        |              |                                        |                 |
5        V              |                                        |                 |
6 [UI/Settings]         |                                        |            {shared_ptr}
7                       |                                        |                 |
8                  {shared_ptr}                                  V                 V
9                       |                                  [Operations:OpConnect,OpXfer etc]----\
10                       |                                                    |                  |
11                       |                                                    |                  |
12                       V                                                    |                  |
13          [IHost:HostRemote,HostLocal] <---{dedicated thread, shared_ptr}---/   [UI/Activities: Confirmations, Errors, Progress]
14                  /                 \
15      {IPC to broker process}       |
16               |                    V
17               V                 [Local filesystem]
18       [HostRemoteBroker]
19               |
20         {aggregation}
21               |
22               V
23       [IProtocol:ProtocolSFTP,ProtocolFile]
25 To add additional protocol:
26 + Write IProtocol implementation and function that instantiates it: see Protocol/ProtocolSFTP.cpp as example
27 + Write protocol-specific options configuration UI: see UI/Settings/ConfigureProtocolSFTP.cpp as example
28 + Define protocol name, broker name and other protocol properties in s_protocols array in Protocol/Protocol.cpp
29 * Dont forget to add new protocol broker related-files into NetRocks/CMakeLists.txt
30 * Keep in mind that protocol implementation hosted in separate process, so it cannot interchange any data via global variables etc