Changes between Version 47 and Version 48 of GuiRpc


Ignore:
Timestamp:
Jan 29, 2021, 12:17:42 AM (4 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GuiRpc

    v47 v48  
    1111The following bindings are available:
    1212
    13  * BOINC has a C++ binding, consisting of the GUI_RPC class.
     13 * BOINC has a C++ binding, consisting of the RPC_CLIENT class.
    1414  The interface is in
    1515  [https://github.com/BOINC/boinc/blob/master/lib/gui_rpc_client.h lib/gui_rpc_client.h],
     
    3535== Connecting ==
    3636
    37 To establish RPC connection to a host,
    38 create a `RPC_CLIENT` object and call
    39 {{{
    40 `init(char* host)`.
     37To establish an RPC connection to a host:
     38
     39{{{
     40RPC_CLIENT rpc;
     41rpc.init(char* host)
    4142}}}
    4243
     
    4647If you're writing a GUI program that needs to communicate with older
    4748versions of the BOINC client:
    48 
    49  * Call `exchange_versions()` to get the client version.
    50  * If `exchange_versions()` fails (it's not supported in pre-5.6 clients)
    51   do a `get_state()` RPC, and get the client version from `CC_STATE::version_info`.
    52  * Use the client version number to decide what subsequent RPCs to make
    53   (version info is included in the RPC list below).
    54 
    55 {{{
    56 #!comment
    57 Most RPCs on the list *lack* version information saying since when they're available.
    58 }}}
     49{{{
     50exchange_versions("your program name", VERSION_INFO& v));
     51}}}
     52The client's version is returned in v.
     53Use the client version number to decide what subsequent RPCs to make
     54(some version info is included in the RPC list below).
    5955
    6056== Authorization ==
    6157
    62 The RPC protocol allows the GUI program to authenticate itself using a password.
     58The RPC protocol allows the GUI program to authenticate itself using a
     59[https://boinc.berkeley.edu/wiki/Controlling_BOINC_remotely password].
    6360Some of the RPC operations can be done without authentication;
    6461others can be done without authentication,
    6562but only by a GUI program running on the same machine.
    6663
    67  `authorize(char* password)`::
    68  Do authorization sequence with the peer, using given password.
     64{{{
     65retval = rpc.authorize(char* password)
     66}}}
     67Authorize with the peer, using given password.
    6968
    7069== RPC list ==
     70
    7171The following functions require authorization for remote clients, but not for local clients.
    72 Note: for client versions 5.5.12 and earlier,
    73 all functions except `get_state()`,
    74 `get_results()`, `get_screensaver_mode()`,
    75 and `set_screensaver_mode()` require authorization.
    7672
    7773{{{
     
    8076parts broken that way to allow word wrap.
    8177}}}
    82 
    83  `exchange_versions(VERSION_INFO&)`::
    84  Exchange version info with the client.
    85  The client's version info is returned.
    86 
    87  `get_activity_state(ACTIVITY_STATE&)`::
    88  Return bitmap of reasons why computation and network are suspended.
    89  '''Deprecated''' - for 5.5.13 and later, use cc_status() instead.
    90  In 5.5.10 and earlier, it returns a `bool` (suspended) rather than bitmap.
    9178
    9279 `get_cc_status(CC_STATUS&)`::
     
    186173 Get information about project credit history (the `PROJECT::statistics` field is populated).
    187174
    188  `network_status(int&)`::
    189  Find whether the client has, needs, or is done with a physical network connection.
    190  Deprecated - for 5.5.13 and later, use [#function-cc_status cc_status()] instead.
    191 
    192175 `set_screensaver_mode``(bool enabled, ``double blank_time, ``DISPLAY_INFO&)`::
    193176 If `enabled` is `true`, the client should try to get an application to provide screensaver graphics.
     
    251234 Run benchmarks.
    252235
    253  `set_debts(vector<PROJECT>)`::
    254  Set the short- and long-term debts of the given projects
    255  (only the `master_url`, `short_term_debt`, `long_term_debt`, `cuda_debt` and `ati_debt`
    256  fields are used in the `PROJECT` structs).
    257 
    258236 `set_global_prefs_override(string&)`::
    259237 Write the given contents to the global preferences override file.