]> sourceware.org Git - systemtap.git/blob - csclient.h
PR 12917 - Implement Compile-Server/Client Versioning: Part 1
[systemtap.git] / csclient.h
1 // -*- C++ -*-
2 // Copyright (C) 2010 Red Hat Inc.
3 //
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
7 // later version.
8 #ifndef CSCLIENT_H
9 #define CSCLIENT_H
10
11 struct compile_server_info;
12
13 class compile_server_client
14 {
15 public:
16 compile_server_client (systemtap_session &s) : s(s) {}
17 int passes_0_4 ();
18
19 private:
20 // Client/server session methods.
21 int initialize ();
22 int create_request ();
23 int package_request ();
24 int find_and_connect_to_server ();
25 int unpack_response ();
26 int process_response ();
27
28 // Client/server utility methods.
29 int include_file_or_directory (
30 const std::string &subdir,
31 const std::string &path,
32 const char *option = 0
33 );
34 int add_package_args ();
35 int add_package_arg (const std::string &arg);
36 int compile_using_server (const std::vector<compile_server_info> &servers);
37 int add_localization_variables();
38
39 int read_from_file (const std::string &fname, int &data);
40 template <class T>
41 int write_to_file (const std::string &fname, const T &data);
42 int flush_to_stream (const std::string &fname, std::ostream &o);
43
44 void show_server_compatibility (int server_version);
45
46 systemtap_session &s;
47 std::vector<std::string> private_ssl_dbs;
48 std::vector<std::string> public_ssl_dbs;
49 std::string client_tmpdir;
50 std::string client_zipfile;
51 std::string server_tmpdir;
52 std::string server_zipfile;
53 int server_version;
54 unsigned argc;
55 };
56
57 // Utility functions
58 void query_server_status (systemtap_session &s);
59 void manage_server_trust (systemtap_session &s);
60
61 #endif // CSCLIENT_H
This page took 0.044571 seconds and 6 git commands to generate.