+ wxLogMessage("OnDisconnect()");
+ return true;
+}
+
+// ----------------------------------------------------------------------------
+// BenchConnection
+// ----------------------------------------------------------------------------
+
+bool BenchConnection::IsSupportedTopicAndItem(const wxString& operation,
+ const wxString& topic,
+ const wxString& item) const
+{
+ if ( topic != IPC_BENCHMARK_TOPIC ||
+ item != IPC_BENCHMARK_ITEM )
+ {
+ wxLogMessage("Unexpected %s(\"%s\", \"%s\") call.",
+ operation, topic, item);
+ return false;
+ }
+
+ return true;
+}
+
+bool BenchConnection::OnPoke(const wxString& topic,
+ const wxString& item,
+ const void *data,
+ size_t size,
+ wxIPCFormat format)
+{
+ if ( !IsSupportedTopicAndItem("OnPoke", topic, item) )
+ return false;
+
+ if ( !IsTextFormat(format) )
+ {
+ wxLogMessage("Unexpected format %d in OnPoke().", format);
+ return false;
+ }
+
+ m_item = GetTextFromData(data, size, format);
+
+ if ( m_advise )
+ {
+ if ( !Advise(item, m_item) )
+ {
+ wxLogMessage("Failed to advise client about the change.");
+ }
+ }
+
+ return true;
+}
+
+bool BenchConnection::OnStartAdvise(const wxString& topic, const wxString& item)
+{
+ if ( !IsSupportedTopicAndItem("OnStartAdvise", topic, item) )
+ return false;
+
+ m_advise = true;
+