Bug 1203092: Add |DaemonSocketResultHandler| base class to HAL IPC, r=shuang
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 15 Sep 2015 12:55:02 +0200
changeset 296891 1a8bfb9330d9b8f4eac3d8e0998a0df979a5d48c
parent 296890 f6493c0d9274c509234862febeaf16a65aebab98
child 296892 103d592c9630671a712d5be3d82524cafa05e537
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshuang
bugs1203092
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1203092: Add |DaemonSocketResultHandler| base class to HAL IPC, r=shuang
ipc/hal/DaemonSocketMessageHandlers.h
ipc/hal/moz.build
new file mode 100644
--- /dev/null
+++ b/ipc/hal/DaemonSocketMessageHandlers.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * Message handlers
+ *
+ * This file contains base classes for message handling.
+ */
+
+#ifndef mozilla_ipc_DaemonSocketMessageHandlers_h
+#define mozilla_ipc_DaemonSocketMessageHandlers_h
+
+#include "nsISupportsImpl.h" // for ref-counting
+
+namespace mozilla {
+namespace ipc {
+
+/**
+ * |DaemonSocketResultHandler| is the base class for all protocol-specific
+ * result handlers. It currently only manages the reference counting.
+ */
+class DaemonSocketResultHandler
+{
+public:
+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DaemonSocketResultHandler);
+
+protected:
+  DaemonSocketResultHandler()
+  { }
+  virtual ~DaemonSocketResultHandler()
+  { }
+};
+
+} // namespace ipc
+} // namespace mozilla
+
+#endif // mozilla_ipc_DaemonSocketMessageHandlers_h
--- a/ipc/hal/moz.build
+++ b/ipc/hal/moz.build
@@ -4,16 +4,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXPORTS.mozilla.ipc += [
     'DaemonRunnables.h',
     'DaemonSocket.h',
     'DaemonSocketConnector.h',
     'DaemonSocketConsumer.h',
+    'DaemonSocketMessageHandlers.h',
     'DaemonSocketPDU.h',
     'DaemonSocketPDUHelpers.h'
 ]
 
 UNIFIED_SOURCES += [
     'DaemonSocket.cpp',
     'DaemonSocketConnector.cpp',
     'DaemonSocketConsumer.cpp',