Changes between Version 2 and Version 3 of GuiRpc
- Timestamp:
- Jun 28, 2007, 5:08:25 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GuiRpc
v2 v3 3 3 The BOINC core client provides a set of RPCs (remote procedure calls) for control and state interrogation. This enables the development of GUI (graphical user interface) programs separately from the core client. These RPCs send XML request and reply messages over a TCP connection. The XML formats are not documented, but can be deduced from the source code. 4 4 5 BOINC provides a C++ interface to these RPCs, consisting of the GUI_RPC class. The interface is in lib/gui_rpc_client.h, and the program boinc_cmd.Cgives a usage example). All member functions return an integer error code.5 BOINC provides a C++ interface to these RPCs, consisting of the GUI_RPC class. The interface is in [source:trunk/boinc/lib/gui_rpc_client.h lib/gui_rpc_client.h], and the program [source:trunk/boinc/lib/boinc_cmd.C boinc_cmd.C] gives a usage example). All member functions return an integer error code. 6 6 It should be easy fairly easy to generate client interfaces in languages other than C++. GUI programs connect to the core client by opening a TCP socket at port 31416. They can then do repeated RPCs over this connection. Each reply message ends with the character '\003. 7 7 … … 10 10 init(char* host) 11 11 }}} 12 12 Establish RPC connection to the given host 13 13 14 14 == Dealing with versions == … … 17 17 18 18 * Create a GUI_RPC object and connect. Call exchange_versions() to get the client version. 19 * If exchange_versions() fails (it's not suppor ed in pre-5.6 clients) do a get_state() RPC, and get the client version from CC_STATE::version_info.19 * If exchange_versions() fails (it's not supported in pre-5.6 clients) do a get_state() RPC, and get the client version from CC_STATE::version_info. 20 20 * Use the client version number to decide what subsequent RPCs to make (version info is included in the RPC list below). 21 21 … … 253 253 }}} 254 254 255 Write the given contents to the global preferences override file. If the arg ment is an empty string, delete the file. Otherwise the argument must be a valid <global_preferences> element.255 Write the given contents to the global preferences override file. If the argument is an empty string, delete the file. Otherwise the argument must be a valid <global_preferences> element. 256 256 257 257 {{{