• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 android.net.wifi;
18 
19 // A callback to notify the results of sending a management frame.
20 interface ISendMgmtFrameEvent {
21   // Error codes for OnFailure():
22 
23   // Unknown error.
24   const int SEND_MGMT_FRAME_ERROR_UNKNOWN = 1;
25 
26   // Specifying the MCS rate is not supported by this device.
27   const int SEND_MGMT_FRAME_ERROR_MCS_UNSUPPORTED = 2;
28 
29   // Driver reported that no ACK was received for the transmitted frame.
30   const int SEND_MGMT_FRAME_ERROR_NO_ACK = 3;
31 
32   // Timed out while waiting for a response from the driver about the status
33   // of the transmitted frame.
34   const int SEND_MGMT_FRAME_ERROR_TIMEOUT = 4;
35 
36   // An existing transmission is in progress. Another frame cannot be sent until
37   // the first transmission completes.
38   const int SEND_MGMT_FRAME_ERROR_ALREADY_STARTED = 5;
39 
40   // Called when the management frame was successfully sent and ACKed by the
41   // recipient.
42   // @param elapsedTimeMs The elapsed time between when the management frame was
43   //     sent and when the ACK was processed, in milliseconds, as measured by
44   //     wificond. This includes the time that the send frame spent queuing
45   //     before it was sent, any firmware retries, and the time the received
46   //     ACK spent queuing before it was processed.
OnAck(int elapsedTimeMs)47   oneway void OnAck(int elapsedTimeMs);
48 
49   // Called when the send failed.
50   // @param reason The error code for the failure.
OnFailure(int reason)51   oneway void OnFailure(int reason);
52 }
53