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 package com.android.server.wifi; 18 19 import android.annotation.IntDef; 20 21 import java.io.FileDescriptor; 22 import java.io.PrintWriter; 23 import java.lang.annotation.Retention; 24 import java.lang.annotation.RetentionPolicy; 25 26 /** 27 * Base class for available WiFi operating modes. 28 * 29 * Currently supported modes include Client, ScanOnly and SoftAp. 30 */ 31 public interface ActiveModeManager { 32 /** 33 * Method used to start the Manager for a given Wifi operational mode. 34 */ start()35 void start(); 36 37 /** 38 * Method used to stop the Manager for a given Wifi operational mode. 39 */ stop()40 void stop(); 41 42 43 /** Scan Modes */ 44 int SCAN_NONE = 0; 45 int SCAN_WITHOUT_HIDDEN_NETWORKS = 1; 46 int SCAN_WITH_HIDDEN_NETWORKS = 2; 47 48 @IntDef({SCAN_NONE, SCAN_WITHOUT_HIDDEN_NETWORKS, SCAN_WITH_HIDDEN_NETWORKS}) 49 @Retention(RetentionPolicy.SOURCE) 50 @interface ScanMode{} 51 52 /** 53 * Method to get the scan mode for a given Wifi operation mode. 54 */ getScanMode()55 @ScanMode int getScanMode(); 56 57 /** 58 * Method to dump for logging state. 59 */ dump(FileDescriptor fd, PrintWriter pw, String[] args)60 void dump(FileDescriptor fd, PrintWriter pw, String[] args); 61 } 62