34 vrpn_int32 request_logging_m_id;
35 vrpn_int32 report_logging_m_id;
36 vrpn_int32 request_logging_status_m_id;
42 bool pack_log_message_of_type(vrpn_int32 type,
43 const char *local_in_logfile_name,
44 const char *local_out_logfile_name,
45 const char *remote_in_logfile_name,
46 const char *remote_out_logfile_name);
54 bool unpack_log_message_from_buffer(
const char *buf, vrpn_int32 buflen,
55 char **local_in_logfile_name,
56 char **local_out_logfile_name,
57 char **remote_in_logfile_name,
58 char **remote_out_logfile_name);
65class VRPN_API vrpn_Auxiliary_Logger_Server :
public vrpn_Auxiliary_Logger {
84 handle_request_logging(
const char *local_in_logfile_name,
85 const char *local_out_logfile_name,
86 const char *remote_in_logfile_name,
87 const char *remote_out_logfile_name) = 0;
91 bool send_report_logging(
const char *local_in_logfile_name,
92 const char *local_out_logfile_name,
93 const char *remote_in_logfile_name,
94 const char *remote_out_logfile_name)
99 return pack_log_message_of_type(
100 report_logging_m_id, local_in_logfile_name, local_out_logfile_name,
101 remote_in_logfile_name, remote_out_logfile_name);
110 virtual void handle_dropped_last_connection(
void);
111 vrpn_int32 dropped_last_connection_m_id;
113 static int VRPN_CALLBACK
114 static_handle_dropped_last_connection(
void *userdata, vrpn_HANDLERPARAM p);
118 static int VRPN_CALLBACK
119 static_handle_request_logging(
void *userdata, vrpn_HANDLERPARAM p);
122 virtual void handle_request_logging_status() = 0;
123 static int VRPN_CALLBACK
124 static_handle_request_logging_status(
void *userdata, vrpn_HANDLERPARAM p);
133class VRPN_API vrpn_Auxiliary_Logger_Server_Generic
134 :
public vrpn_Auxiliary_Logger_Server {
137 vrpn_Auxiliary_Logger_Server_Generic(
const char *logger_name,
138 const char *connection_to_log,
140 ~vrpn_Auxiliary_Logger_Server_Generic();
148 virtual void handle_request_logging(
const char *local_in_logfile_name,
149 const char *local_out_logfile_name,
150 const char *remote_in_logfile_name,
151 const char *remote_out_logfile_name);
153 virtual void handle_request_logging_status();
160 if (d_logging_connection) {
161 d_logging_connection->mainloop();
162 d_logging_connection->save_log_so_far();
168 char *d_connection_name;
192class VRPN_API vrpn_Auxiliary_Logger_Remote :
public vrpn_Auxiliary_Logger {
194 vrpn_Auxiliary_Logger_Remote(
const char *name,
vrpn_Connection *c = NULL);
207 bool send_logging_request(
const char *local_in_logfile_name,
208 const char *local_out_logfile_name =
"",
209 const char *remote_in_logfile_name =
"",
210 const char *remote_out_logfile_name =
"")
215 return pack_log_message_of_type(
216 request_logging_m_id, local_in_logfile_name, local_out_logfile_name,
217 remote_in_logfile_name, remote_out_logfile_name);
220 bool send_logging_status_request()
225 return pack_log_message_of_type(request_logging_status_m_id, NULL, NULL,
230 virtual int register_report_handler(
void *userdata,
231 vrpn_AUXLOGGERREPORTHANDLER handler)
233 return d_callback_list.register_handler(userdata, handler);
235 virtual int unregister_report_handler(
void *userdata,
236 vrpn_AUXLOGGERREPORTHANDLER handler)
238 return d_callback_list.unregister_handler(userdata, handler);
249 static int VRPN_CALLBACK