aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/binder
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant/binder')
-rw-r--r--wpa_supplicant/binder/binder_constants.cpp18
-rw-r--r--wpa_supplicant/binder/binder_constants.h21
-rw-r--r--wpa_supplicant/binder/binder_manager.cpp5
-rw-r--r--wpa_supplicant/binder/binder_manager.h2
4 files changed, 41 insertions, 5 deletions
diff --git a/wpa_supplicant/binder/binder_constants.cpp b/wpa_supplicant/binder/binder_constants.cpp
new file mode 100644
index 0000000..0d452b1
--- /dev/null
+++ b/wpa_supplicant/binder/binder_constants.cpp
@@ -0,0 +1,18 @@
+/*
+ * binder interface for wpa_supplicant daemon
+ * Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2016, Roshan Pius <rpius@google.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "binder_constants.h"
+
+namespace wpa_supplicant_binder {
+namespace binder_constants {
+
+const char kServiceName[] = "wpa_supplicant";
+
+} /* namespace binder_constants */
+} /* namespace wpa_supplicant_binder */
diff --git a/wpa_supplicant/binder/binder_constants.h b/wpa_supplicant/binder/binder_constants.h
new file mode 100644
index 0000000..9213657
--- /dev/null
+++ b/wpa_supplicant/binder/binder_constants.h
@@ -0,0 +1,21 @@
+/*
+ * binder interface for wpa_supplicant daemon
+ * Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2016, Roshan Pius <rpius@google.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef BINDER_CONSTANTS_H
+#define BINDER_CONSTANTS_H
+
+namespace wpa_supplicant_binder {
+namespace binder_constants {
+
+extern const char kServiceName[];
+
+} /* namespace binder_constants */
+} /* namespace wpa_supplicant_binder */
+
+#endif /* BINDER_CONSTANTS_H */
diff --git a/wpa_supplicant/binder/binder_manager.cpp b/wpa_supplicant/binder/binder_manager.cpp
index 728f4b7..62a1d36 100644
--- a/wpa_supplicant/binder/binder_manager.cpp
+++ b/wpa_supplicant/binder/binder_manager.cpp
@@ -9,6 +9,7 @@
#include <binder/IServiceManager.h>
+#include "binder_constants.h"
#include "binder_manager.h"
extern "C" {
@@ -18,10 +19,8 @@ extern "C" {
namespace wpa_supplicant_binder {
-const char BinderManager::kBinderServiceName[] = "fi.w1.wpa_supplicant";
BinderManager *BinderManager::instance_ = NULL;
-
BinderManager * BinderManager::getInstance()
{
if (!instance_)
@@ -43,7 +42,7 @@ int BinderManager::registerBinderService(struct wpa_global *global)
/* Create the main binder service object and register with
* system service manager. */
supplicant_object_ = new Supplicant(global);
- android::String16 service_name(kBinderServiceName);
+ android::String16 service_name(binder_constants::kServiceName);
android::defaultServiceManager()->addService(
service_name,
android::IInterface::asBinder(supplicant_object_));
diff --git a/wpa_supplicant/binder/binder_manager.h b/wpa_supplicant/binder/binder_manager.h
index 687e740..45def12 100644
--- a/wpa_supplicant/binder/binder_manager.h
+++ b/wpa_supplicant/binder/binder_manager.h
@@ -29,8 +29,6 @@ namespace wpa_supplicant_binder {
*/
class BinderManager {
public:
- static const char kBinderServiceName[];
-
static BinderManager * getInstance();
static void destroyInstance();
int registerBinderService(struct wpa_global *global);