LOCAL_INIT_RC := wificond.rc
LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
LOCAL_SRC_FILES := \
+ aidl/android/net/wifi/IWificond.aidl \
main.cpp \
- aidl/android/wificond/IServer.aidl \
server.cpp
LOCAL_SHARED_LIBRARIES := \
libbinder \
--- /dev/null
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.wifi;
+
+// IChip represents a particular chip attached to the host. Generally,
+// chips have a set of capabilities which determine the ways they can
+// be configured. To use the functionality of a chip, request an interface
+// be configured via IChip.Configure*Interface(). Chips may support being
+// configured with multiple interfaces at once.
+interface IChip {
+
+}
* limitations under the License.
*/
-package android.wificond;
+package android.net.wifi;
+
+import android.net.wifi.IChip;
+
+// Service interface that exposes primitives for controlling the WiFi
+// subsystems of a host.
+interface IWificond {
+
+ // Get a list of chips that export WiFi functionality.
+ //
+ // @return list of android.net.wifi.IChip objects representing
+ // the set of WiFi chips on this device.
+ List<IBinder> GetChips();
-interface IServer {
- // Retrieve a quick response message from the server.
- @utf8InCpp String Ping();
}
#include <looper_backed_event_loop.h>
#include <server.h>
+using android::net::wifi::IWificond;
+
namespace {
class ScopedSignalHandler final {
}
android::sp<android::IServiceManager> sm = android::defaultServiceManager();
CHECK_EQ(sm != NULL, true) << "Could not obtain IServiceManager";
- android::sp<android::wificond::Server> server = new android::wificond::Server();
+ android::sp<android::IBinder> server = new android::wificond::Server();
sm->addService(android::String16("wificond"), server);
event_dispatcher_->Poll();
#include "server.h"
-#include "android/wificond/BnServer.h"
-
namespace android {
namespace wificond {
-android::binder::Status Server::Ping(::std::string* _aidl_return) {
- *_aidl_return = std::string("Pong");
+android::binder::Status Server::GetChips(std::vector<sp<IBinder>>* chips) {
+ // TODO: Enumerate chips and return the ones we know about.
+ chips->clear();
return binder::Status::ok();
}
-} // namespace android
} // namespace wificond
-
+} // namespace android
* limitations under the License.
*/
-#include "android/wificond/BnServer.h"
+#include "android/net/wifi/BnWificond.h"
namespace android {
namespace wificond {
-class Server : public BnServer {
+class Server : public android::net::wifi::BnWificond {
public:
- android::binder::Status Ping(::std::string* _aidl_return) override;
+ android::binder::Status GetChips(std::vector<sp<IBinder>>* chips);
};
-} // namespace android
} // namespace wificond
-
+} // namespace android