18c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley/*
28c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * Copyright (C) 2016 The Android Open Source Project
38c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley *
48c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * Licensed under the Apache License, Version 2.0 (the "License");
58c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * you may not use this file except in compliance with the License.
68c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * You may obtain a copy of the License at
78c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley *
88c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley *      http://www.apache.org/licenses/LICENSE-2.0
98c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley *
108c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * Unless required by applicable law or agreed to in writing, software
118c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * distributed under the License is distributed on an "AS IS" BASIS,
128c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * See the License for the specific language governing permissions and
148c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley * limitations under the License.
158c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley */
168c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
178c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley#ifndef ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
188c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley#define ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
198c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
208c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley#include <android-base/macros.h>
218c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
228c784cd2472164c2bcbe33375c173f67247955ebChristopher Wileynamespace android {
238c784cd2472164c2bcbe33375c173f67247955ebChristopher Wileynamespace wifi_system {
248c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
258c784cd2472164c2bcbe33375c173f67247955ebChristopher Wileyclass SupplicantManager {
268c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley public:
278c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  SupplicantManager() = default;
288c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  virtual ~SupplicantManager() = default;
298c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
308c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  // Request that supplicant be started.
318c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  // Returns true on success.
328c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  virtual bool StartSupplicant();
338c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
348c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  // Request that a running instance of supplicant be stopped.
358c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  // Returns true on success.
368c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  virtual bool StopSupplicant();
378c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
388c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  // Returns true iff supplicant is still running.
398c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  virtual bool IsSupplicantRunning();
408c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
41ff66f41f8f457bf5e9c0c75d72dbe74f9dfc3102Ningyuan Wang  // Returns true iff supplicant entropy file exists.
42ff66f41f8f457bf5e9c0c75d72dbe74f9dfc3102Ningyuan Wang  static bool EnsureEntropyFileExists();
43ff66f41f8f457bf5e9c0c75d72dbe74f9dfc3102Ningyuan Wang
448c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley private:
458c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley  DISALLOW_COPY_AND_ASSIGN(SupplicantManager);
468c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley};  // class SupplicantManager
478c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
488c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley}  // namespace wifi_system
498c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley}  // namespace android
508c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley
518c784cd2472164c2bcbe33375c173f67247955ebChristopher Wiley#endif  // ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
52