summaryrefslogtreecommitdiff
path: root/src/CommonAPI/MainLoopContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/CommonAPI/MainLoopContext.cpp')
-rw-r--r--src/CommonAPI/MainLoopContext.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/CommonAPI/MainLoopContext.cpp b/src/CommonAPI/MainLoopContext.cpp
index b13cd89..c8bcb41 100644
--- a/src/CommonAPI/MainLoopContext.cpp
+++ b/src/CommonAPI/MainLoopContext.cpp
@@ -1,12 +1,9 @@
-/* Copyright (C) 2013 BMW Group
- * Author: Manfred Bathelt (manfred.bathelt@bmw.de)
- * Author: Juergen Gehring (juergen.gehring@bmw.de)
- * 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/. */
-
-#include "MainLoopContext.h"
+// Copyright (C) 2013-2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// 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/.
+#include <CommonAPI/MainLoopContext.hpp>
namespace CommonAPI {
@@ -14,6 +11,10 @@ int64_t getCurrentTimeInMs() {
return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
}
+const std::string &MainLoopContext::getName() const {
+ return name_;
+}
+
DispatchSourceListenerSubscription MainLoopContext::subscribeForDispatchSources(DispatchSourceAddedCallback dispatchAddedCallback, DispatchSourceRemovedCallback dispatchRemovedCallback) {
dispatchSourceListeners_.emplace_front(dispatchAddedCallback, dispatchRemovedCallback);
return dispatchSourceListeners_.begin();
@@ -96,4 +97,4 @@ bool MainLoopContext::isInitialized() {
return dispatchSourceListeners_.size() > 0 || watchListeners_.size() > 0;
}
-} //Namespace CommonAPI
+} // namespace CommonAPI