1 /* 2 * Copyright (C) 2008 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 _SUPPLICANT_EVENT_H 18 #define _SUPPLICANT_EVENT_H 19 20 #include <sys/types.h> 21 22 class SupplicantEvent { 23 private: 24 int mType; 25 int mLevel; 26 27 public: 28 static const int EVENT_UNKNOWN = 0; 29 static const int EVENT_CONNECTED = 1; 30 static const int EVENT_DISCONNECTED = 2; 31 static const int EVENT_TERMINATING = 3; 32 static const int EVENT_PASSWORD_CHANGED = 4; 33 static const int EVENT_EAP_NOTIFICATION = 5; 34 static const int EVENT_EAP_STARTED = 6; 35 static const int EVENT_EAP_METHOD = 7; 36 static const int EVENT_EAP_SUCCESS = 8; 37 static const int EVENT_EAP_FAILURE = 9; 38 static const int EVENT_SCAN_RESULTS = 10; 39 static const int EVENT_STATE_CHANGE = 11; 40 static const int EVENT_LINK_SPEED = 12; 41 static const int EVENT_DRIVER_STATE = 13; 42 static const int EVENT_ASSOCIATING = 14; 43 static const int EVENT_ASSOCIATED = 15; 44 static const int EVENT_CONNECTIONTIMEOUT = 16; 45 46 public: 47 SupplicantEvent(int type, int level); 48 virtual ~SupplicantEvent() {} 49 50 int getType() { return mType; } 51 int getLevel() { return mLevel; } 52 }; 53 54 #endif 55