2 // Copyright (C) 2010-2011 Red Hat Inc.
4 // This file is part of systemtap, and is free software. You can
5 // redistribute it and/or modify it under the terms of the GNU General
6 // Public License (GPL); either version 2, or (at your option) any
14 struct compile_server_info
;
16 class compile_server_client
19 compile_server_client (systemtap_session
&s
) : s(s
), argc(0), server_version() {}
23 // Client/server session methods.
25 int create_request ();
26 int package_request ();
27 int find_and_connect_to_server ();
28 int unpack_response ();
29 int process_response ();
31 // Client/server utility methods.
32 int include_file_or_directory (
33 const std::string
&subdir
,
34 const std::string
&path
36 int add_package_args ();
37 int add_package_arg (const std::string
&arg
);
38 int compile_using_server (const std::vector
<compile_server_info
> &servers
);
39 int add_localization_variables();
41 int read_from_file (const std::string
&fname
, int &data
);
43 int write_to_file (const std::string
&fname
, const T
&data
);
44 int flush_to_stream (const std::string
&fname
, std::ostream
&o
);
46 void show_server_compatibility () const;
49 std::vector
<std::string
> private_ssl_dbs
;
50 std::vector
<std::string
> public_ssl_dbs
;
51 std::string client_tmpdir
;
52 std::string client_zipfile
;
53 std::string server_tmpdir
;
54 std::string server_zipfile
;
56 cs_protocol_version server_version
;
61 void query_server_status (systemtap_session
&s
);
62 void manage_server_trust (systemtap_session
&s
);