1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
18 #define ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
19 
20 #include <android-base/macros.h>
21 
22 namespace android {
23 namespace wifi_system {
24 
25 class SupplicantManager {
26  public:
27   SupplicantManager() = default;
28   virtual ~SupplicantManager() = default;
29 
30   // Request that supplicant be started.
31   // Returns true on success.
32   virtual bool StartSupplicant();
33 
34   // Request that a running instance of supplicant be stopped.
35   // Returns true on success.
36   virtual bool StopSupplicant();
37 
38   // Returns true iff supplicant is still running.
39   virtual bool IsSupplicantRunning();
40 
41   // Returns true iff supplicant entropy file exists.
42   static bool EnsureEntropyFileExists();
43 
44  private:
45   DISALLOW_COPY_AND_ASSIGN(SupplicantManager);
46 };  // class SupplicantManager
47 
48 }  // namespace wifi_system
49 }  // namespace android
50 
51 #endif  // ANDROID_WIFI_SYSTEM_SUPPLICANT_MANAGER_H
52