CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
talk.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_TALK_H_
6 #define CVMFS_TALK_H_
7 
8 #include <pthread.h>
9 #include <unistd.h>
10 
11 #include <string>
12 #include <vector>
13 
14 #include "util/single_copy.h"
15 
16 namespace download {
17 class DownloadManager;
18 }
19 class FileSystem;
20 class FuseRemounter;
21 class MountPoint;
22 class OptionsManager;
23 
24 
30  public:
31  static TalkManager *Create(const std::string &socket_path,
32  MountPoint *mount_point,
33  FuseRemounter *remounter);
34  ~TalkManager();
35 
36  void Spawn();
37 
38  private:
42  static const unsigned kMaxCommandSize = 512;
43 
44  TalkManager(const std::string &socket_path,
45  MountPoint *mount_point,
46  FuseRemounter *remounter);
47  static void *MainResponder(void *data);
48  void Answer(int con_fd, const std::string &msg);
49  void AnswerStringList(int con_fd, const std::vector<std::string> &list);
50  std::string FormatHostInfo(download::DownloadManager *download_mgr);
51  std::string FormatProxyInfo(download::DownloadManager *download_mgr);
52  std::string FormatLatencies(const MountPoint &mount_point,
53  FileSystem *file_system);
54 
55  std::string socket_path_;
59  pthread_t thread_talk_;
60  bool spawned_;
61 };
62 
63 #endif // CVMFS_TALK_H_
MountPoint * mount_point_
Definition: talk.h:57
FuseRemounter * remounter_
Definition: talk.h:58
std::string FormatProxyInfo(download::DownloadManager *download_mgr)
Definition: talk.cc:126
std::string FormatLatencies(const MountPoint &mount_point, FileSystem *file_system)
Definition: talk.cc:723
int socket_fd_
Definition: talk.h:56
bool spawned_
Definition: talk.h:60
static TalkManager * Create(const std::string &socket_path, MountPoint *mount_point, FuseRemounter *remounter)
Definition: talk.cc:78
void Answer(int con_fd, const std::string &msg)
Definition: talk.cc:64
pthread_t thread_talk_
Definition: talk.h:59
TalkManager(const std::string &socket_path, MountPoint *mount_point, FuseRemounter *remounter)
Definition: talk.cc:807
std::string socket_path_
Definition: talk.h:55
std::string FormatHostInfo(download::DownloadManager *download_mgr)
Definition: talk.cc:99
static void * MainResponder(void *data)
Definition: talk.cc:159
~TalkManager()
Definition: talk.cc:821
void AnswerStringList(int con_fd, const std::vector< std::string > &list)
Definition: talk.cc:69
void Spawn()
Definition: talk.cc:843
static const unsigned kMaxCommandSize
Definition: talk.h:42