Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3893b7b7 authored by Gabriel Biren's avatar Gabriel Biren Committed by Android (Google) Code Review
Browse files

Merge "Update supplicant callbacks with reccomendations from the ANAPIC review."

parents ba6301fd 05e2e84c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -36,5 +36,4 @@ package android.hardware.wifi.supplicant;
interface ISupplicantCallback {
  oneway void onInterfaceCreated(in String ifaceName);
  oneway void onInterfaceRemoved(in String ifaceName);
  oneway void onTerminating();
}
+3 −8
Original line number Diff line number Diff line
@@ -24,23 +24,18 @@ package android.hardware.wifi.supplicant;
 * |ISupplicant.registerCallback| method.
 */
@VintfStability
interface ISupplicantCallback {
oneway interface ISupplicantCallback {
    /**
     * Used to indicate that a new interface has been created.
     *
     * @param ifaceName Name of the network interface, e.g., wlan0
     */
    oneway void onInterfaceCreated(in String ifaceName);
    void onInterfaceCreated(in String ifaceName);

    /**
     * Used to indicate that an interface has been removed.
     *
     * @param ifaceName Name of the network interface, e.g., wlan0
     */
    oneway void onInterfaceRemoved(in String ifaceName);

    /**
     * Used to indicate that the supplicant daemon is terminating.
     */
    oneway void onTerminating();
    void onInterfaceRemoved(in String ifaceName);
}
+20 −21
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import android.hardware.wifi.supplicant.WpsDevPasswordId;
 * corresponding |ISupplicantP2pIface.registerCallback| method.
 */
@VintfStability
interface ISupplicantP2pIfaceCallback {
oneway interface ISupplicantP2pIfaceCallback {
    /**
     * Used to indicate that a P2P device has been found.
     *
@@ -50,7 +50,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param wfdDeviceInfo WFD device info as described in section 5.1.2 of WFD
     *        technical specification v1.0.0.
     */
    oneway void onDeviceFound(in byte[] srcAddress, in byte[] p2pDeviceAddress,
    void onDeviceFound(in byte[] srcAddress, in byte[] p2pDeviceAddress,
            in byte[] primaryDeviceType, in String deviceName, in WpsConfigMethods configMethods,
            in byte deviceCapabilities, in P2pGroupCapabilityMask groupCapabilities,
            in byte[] wfdDeviceInfo);
@@ -60,19 +60,19 @@ interface ISupplicantP2pIfaceCallback {
     *
     * @param p2pDeviceAddress P2P device address.
     */
    oneway void onDeviceLost(in byte[] p2pDeviceAddress);
    void onDeviceLost(in byte[] p2pDeviceAddress);

    /**
     * Used to indicate the termination of P2P find operation.
     */
    oneway void onFindStopped();
    void onFindStopped();

    /**
     * Used to indicate the completion of a P2P Group Owner negotiation request.
     *
     * @param status Status of the GO negotiation.
     */
    oneway void onGoNegotiationCompleted(in P2pStatusCode status);
    void onGoNegotiationCompleted(in P2pStatusCode status);

    /**
     * Used to indicate the reception of a P2P Group Owner negotiation request.
@@ -81,19 +81,19 @@ interface ISupplicantP2pIfaceCallback {
     *        negotiation request.
     * @param passwordId Type of password.
     */
    oneway void onGoNegotiationRequest(in byte[] srcAddress, in WpsDevPasswordId passwordId);
    void onGoNegotiationRequest(in byte[] srcAddress, in WpsDevPasswordId passwordId);

    /**
     * Used to indicate a failure to form a P2P group.
     *
     * @param failureReason Failure reason string for debug purposes.
     */
    oneway void onGroupFormationFailure(in String failureReason);
    void onGroupFormationFailure(in String failureReason);

    /**
     * Used to indicate a successful formation of a P2P group.
     */
    oneway void onGroupFormationSuccess();
    void onGroupFormationSuccess();

    /**
     * Used to indicate the removal of a P2P group.
@@ -101,7 +101,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
     * @param isGroupOwner Whether this device is owner of the group.
     */
    oneway void onGroupRemoved(in String groupIfname, in boolean isGroupOwner);
    void onGroupRemoved(in String groupIfname, in boolean isGroupOwner);

    /**
     * Used to indicate the start of a P2P group.
@@ -115,7 +115,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param goDeviceAddress MAC Address of the owner of this group.
     * @param isPersistent Whether this group is persisted or not.
     */
    oneway void onGroupStarted(in String groupIfname, in boolean isGroupOwner, in byte[] ssid,
    void onGroupStarted(in String groupIfname, in boolean isGroupOwner, in byte[] ssid,
            in int frequency, in byte[] psk, in String passphrase, in byte[] goDeviceAddress,
            in boolean isPersistent);

@@ -128,8 +128,8 @@ interface ISupplicantP2pIfaceCallback {
     * @param persistentNetworkId Persistent network Id of the group.
     * @param operatingFrequency Frequency on which the invitation was received.
     */
    oneway void onInvitationReceived(in byte[] srcAddress, in byte[] goDeviceAddress,
            in byte[] bssid, in int persistentNetworkId, in int operatingFrequency);
    void onInvitationReceived(in byte[] srcAddress, in byte[] goDeviceAddress, in byte[] bssid,
            in int persistentNetworkId, in int operatingFrequency);

    /**
     * Used to indicate the result of the P2P invitation request.
@@ -137,7 +137,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param bssid Bssid of the group.
     * @param status Status of the invitation.
     */
    oneway void onInvitationResult(in byte[] bssid, in P2pStatusCode status);
    void onInvitationResult(in byte[] bssid, in P2pStatusCode status);

    /**
     * Used to indicate the completion of a P2P provision discovery request.
@@ -148,7 +148,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param configMethods Mask of WPS configuration methods supported.
     * @param generatedPin 8 digit pin generated.
     */
    oneway void onProvisionDiscoveryCompleted(in byte[] p2pDeviceAddress, in boolean isRequest,
    void onProvisionDiscoveryCompleted(in byte[] p2pDeviceAddress, in boolean isRequest,
            in P2pProvDiscStatusCode status, in WpsConfigMethods configMethods,
            in String generatedPin);

@@ -174,7 +174,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param wfdR2DeviceInfo WFD R2 device info as described in section 5.1.12 of WFD
     *        technical specification v2.1.
     */
    oneway void onR2DeviceFound(in byte[] srcAddress, in byte[] p2pDeviceAddress,
    void onR2DeviceFound(in byte[] srcAddress, in byte[] p2pDeviceAddress,
            in byte[] primaryDeviceType, in String deviceName, in WpsConfigMethods configMethods,
            in byte deviceCapabilities, in P2pGroupCapabilityMask groupCapabilities,
            in byte[] wfdDeviceInfo, in byte[] wfdR2DeviceInfo);
@@ -187,8 +187,7 @@ interface ISupplicantP2pIfaceCallback {
     *        Wifi P2P Technical specification v1.2.
     * @parm tlvs Refer to section 3.1.3.1 of Wifi P2P Technical specification v1.2.
     */
    oneway void onServiceDiscoveryResponse(
            in byte[] srcAddress, in char updateIndicator, in byte[] tlvs);
    void onServiceDiscoveryResponse(in byte[] srcAddress, in char updateIndicator, in byte[] tlvs);

    /**
     * Used to indicate when a STA device is connected to this device.
@@ -196,7 +195,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param srcAddress MAC address of the device that was authorized.
     * @param p2pDeviceAddress P2P device address.
     */
    oneway void onStaAuthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
    void onStaAuthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);

    /**
     * Used to indicate when a STA device is disconnected from this device.
@@ -204,7 +203,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param srcAddress MAC address of the device that was deauthorized.
     * @param p2pDeviceAddress P2P device address.
     */
    oneway void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);
    void onStaDeauthorized(in byte[] srcAddress, in byte[] p2pDeviceAddress);

    /**
     * Used to indicate that operating frequency has changed for this P2P group interface.
@@ -212,7 +211,7 @@ interface ISupplicantP2pIfaceCallback {
     * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
     * @param frequency New operating frequency in MHz.
     */
    oneway void onGroupFrequencyChanged(in String groupIfname, in int frequency);
    void onGroupFrequencyChanged(in String groupIfname, in int frequency);

    /**
     * Used to indicate that a P2P device has been found.
@@ -240,7 +239,7 @@ interface ISupplicantP2pIfaceCallback {
     *         Information technology. The length indicates the size of the payload.
     *         Multiple information elements may be appended within the byte array.
     */
    oneway void onDeviceFoundWithVendorElements(in byte[] srcAddress, in byte[] p2pDeviceAddress,
    void onDeviceFoundWithVendorElements(in byte[] srcAddress, in byte[] p2pDeviceAddress,
            in byte[] primaryDeviceType, in String deviceName, in WpsConfigMethods configMethods,
            in byte deviceCapabilities, in P2pGroupCapabilityMask groupCapabilities,
            in byte[] wfdDeviceInfo, in byte[] wfdR2DeviceInfo, in byte[] vendorElemBytes);
+2 −2
Original line number Diff line number Diff line
@@ -452,12 +452,12 @@ interface ISupplicantStaIface {
     * This allows other radio works to be performed. If this method is not
     * invoked (e.g., due to the external program terminating), supplicant
     * must time out the radio work item on the iface and send
     * |ISupplicantCallback.onExtRadioWorkTimeout| event to indicate
     * |ISupplicantStaIfaceCallback.onExtRadioWorkTimeout| event to indicate
     * that this has happened.
     *
     * This method may also be used to cancel items that have been scheduled
     * via |addExtRadioWork|, but have not yet been started (notified via
     * |ISupplicantCallback.onExtRadioWorkStart|).
     * |ISupplicantStaIfaceCallback.onExtRadioWorkStart|).
     *
     * @param id Identifier generated for the radio work addition
     *         (using |addExtRadioWork|).
+29 −31
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ import android.hardware.wifi.supplicant.WpsErrorIndication;
 * corresponding |ISupplicantStaIface.registerCallback| method.
 */
@VintfStability
interface ISupplicantStaIfaceCallback {
oneway interface ISupplicantStaIfaceCallback {
    /**
     * Used to indicate the result of ANQP (either for IEEE 802.11u Interworking
     * or Hotspot 2.0) query.
@@ -53,7 +53,7 @@ interface ISupplicantStaIfaceCallback {
     * @param hs20Data ANQP data fetched from the Hotspot 2.0 access point.
     *        All the fields in this struct must be empty if the query failed.
     */
    oneway void onAnqpQueryDone(in byte[] bssid, in AnqpData data, in Hs20AnqpData hs20Data);
    void onAnqpQueryDone(in byte[] bssid, in AnqpData data, in Hs20AnqpData hs20Data);

    /**
     * Used to indicate an association rejection received from the AP
@@ -61,14 +61,14 @@ interface ISupplicantStaIfaceCallback {
     *
     * @param assocRejectData Association Rejection related information.
     */
    oneway void onAssociationRejected(in AssociationRejectionData assocRejectData);
    void onAssociationRejected(in AssociationRejectionData assocRejectData);

    /**
     * Used to indicate the timeout of authentication to an AP.
     *
     * @param bssid BSSID of the corresponding AP.
     */
    oneway void onAuthenticationTimeout(in byte[] bssid);
    void onAuthenticationTimeout(in byte[] bssid);

    /**
     * Indicates BTM request frame handling status.
@@ -76,7 +76,7 @@ interface ISupplicantStaIfaceCallback {
     * @param tmData Data retrieved from received BSS transition management
     * request frame.
     */
    oneway void onBssTmHandlingDone(in BssTmData tmData);
    void onBssTmHandlingDone(in BssTmData tmData);

    /**
     * Used to indicate the change of active bssid.
@@ -86,7 +86,7 @@ interface ISupplicantStaIfaceCallback {
     * @param reason Reason why the bssid changed.
     * @param bssid BSSID of the corresponding AP.
     */
    oneway void onBssidChanged(in BssidChangeReason reason, in byte[] bssid);
    void onBssidChanged(in BssidChangeReason reason, in byte[] bssid);

    /**
     * Used to indicate the disconnection from the currently connected
@@ -98,7 +98,7 @@ interface ISupplicantStaIfaceCallback {
     * @param reasonCode 802.11 code to indicate the disconnect reason
     *        from access point. Refer to section 8.4.1.7 of IEEE802.11 spec.
     */
    oneway void onDisconnected(
    void onDisconnected(
            in byte[] bssid, in boolean locallyGenerated, in StaIfaceReasonCode reasonCode);

    /**
@@ -115,31 +115,31 @@ interface ISupplicantStaIfaceCallback {
     * bandList: A list of band parameters that are supported by the Enrollee expressed as the
     *     Operating Class.
     */
    oneway void onDppFailure(
    void onDppFailure(
            in DppFailureCode code, in String ssid, in String channelList, in char[] bandList);

    /**
     * Indicates a DPP progress event.
     */
    oneway void onDppProgress(in DppProgressCode code);
    void onDppProgress(in DppProgressCode code);

    /**
     * Indicates a DPP success event.
     */
    oneway void onDppSuccess(in DppEventType event);
    void onDppSuccess(in DppEventType event);

    /**
     * Indicates DPP configuration received success event in Enrolee mode.
     * This is also triggered when Configurator generates credentials for itself
     * using generateSelfDppConfiguration() API
     */
    oneway void onDppSuccessConfigReceived(in byte[] ssid, in String password, in byte[] psk,
    void onDppSuccessConfigReceived(in byte[] ssid, in String password, in byte[] psk,
            in DppAkm securityAkm, in DppConnectionKeys dppConnectionKeys);

    /**
     * Indicates DPP configuration sent success event (Configurator mode).
     */
    oneway void onDppSuccessConfigSent();
    void onDppSuccessConfigSent();

    /**
     * Indicates an EAP authentication failure.
@@ -147,21 +147,21 @@ interface ISupplicantStaIfaceCallback {
     *        Either standard error code (enum EapErrorCode) or
     *        private error code defined by network provider.
     */
    oneway void onEapFailure(in int errorCode);
    void onEapFailure(in int errorCode);

    /**
     * Used to indicate that the external radio work can start now.
     *
     * @param id Identifier generated for the radio work request.
     */
    oneway void onExtRadioWorkStart(in int id);
    void onExtRadioWorkStart(in int id);

    /**
     * Used to indicate that the external radio work request has timed out.
     *
     * @param id Identifier generated for the radio work request.
     */
    oneway void onExtRadioWorkTimeout(in int id);
    void onExtRadioWorkTimeout(in int id);

    /**
     * Used to indicate a Hotspot 2.0 imminent deauth notice.
@@ -172,7 +172,7 @@ interface ISupplicantStaIfaceCallback {
     * @param reAuthDelayInSec Delay before reauthenticating.
     * @param url URL of the server.
     */
    oneway void onHs20DeauthImminentNotice(
    void onHs20DeauthImminentNotice(
            in byte[] bssid, in int reasonCode, in int reAuthDelayInSec, in String url);

    /**
@@ -183,7 +183,7 @@ interface ISupplicantStaIfaceCallback {
     * @param data Icon data fetched from the access point.
     *        Must be empty if the query failed.
     */
    oneway void onHs20IconQueryDone(in byte[] bssid, in String fileName, in byte[] data);
    void onHs20IconQueryDone(in byte[] bssid, in String fileName, in byte[] data);

    /**
     * Used to indicate a Hotspot 2.0 subscription remediation event.
@@ -192,8 +192,7 @@ interface ISupplicantStaIfaceCallback {
     * @param osuMethod OSU method.
     * @param url URL of the server.
     */
    oneway void onHs20SubscriptionRemediation(
            in byte[] bssid, in OsuMethod osuMethod, in String url);
    void onHs20SubscriptionRemediation(in byte[] bssid, in OsuMethod osuMethod, in String url);

    /**
     * Used to indicate a Hotspot 2.0 terms and conditions acceptance is requested from the user
@@ -202,15 +201,14 @@ interface ISupplicantStaIfaceCallback {
     * @param bssid BSSID of the access point.
     * @param url URL of the T&C server.
     */
    oneway void onHs20TermsAndConditionsAcceptanceRequestedNotification(
            in byte[] bssid, in String url);
    void onHs20TermsAndConditionsAcceptanceRequestedNotification(in byte[] bssid, in String url);

    /**
     * Used to indicate that a new network has been added.
     *
     * @param id Network ID allocated to the corresponding network.
     */
    oneway void onNetworkAdded(in int id);
    void onNetworkAdded(in int id);

    /**
     * Used to indicate that the supplicant failed to find a network in scan result
@@ -219,14 +217,14 @@ interface ISupplicantStaIfaceCallback {
     *
     * @param ssid network name supplicant tried to connect.
     */
    oneway void onNetworkNotFound(in byte[] ssid);
    void onNetworkNotFound(in byte[] ssid);

    /**
     * Used to indicate that a network has been removed.
     *
     * @param id Network ID allocated to the corresponding network.
     */
    oneway void onNetworkRemoved(in int id);
    void onNetworkRemoved(in int id);

    /**
     * Indicates pairwise master key (PMK) cache added event.
@@ -235,7 +233,7 @@ interface ISupplicantStaIfaceCallback {
     * @param serializedEntry is serialized PMK cache entry, the content is
     *              opaque for the framework and depends on the native implementation.
     */
    oneway void onPmkCacheAdded(in long expirationTimeInSec, in byte[] serializedEntry);
    void onPmkCacheAdded(in long expirationTimeInSec, in byte[] serializedEntry);

    /**
     * Used to indicate a state change event on this particular iface. If this
@@ -256,7 +254,7 @@ interface ISupplicantStaIfaceCallback {
     *        to a particular network.
     * @param filsHlpSent If FILS HLP IEs were included in this association.
     */
    oneway void onStateChanged(in StaIfaceCallbackState newState, in byte[] bssid, in int id,
    void onStateChanged(in StaIfaceCallbackState newState, in byte[] bssid, in int id,
            in byte[] ssid, in boolean filsHlpSent);

    /**
@@ -267,29 +265,29 @@ interface ISupplicantStaIfaceCallback {
     * @param configError Configuration error code.
     * @param errorInd Error indication code.
     */
    oneway void onWpsEventFail(
    void onWpsEventFail(
            in byte[] bssid, in WpsConfigError configError, in WpsErrorIndication errorInd);

    /**
     * Used to indicate the overlap of a WPS PBC connection attempt.
     */
    oneway void onWpsEventPbcOverlap();
    void onWpsEventPbcOverlap();

    /**
     * Used to indicate the success of a WPS connection attempt.
     */
    oneway void onWpsEventSuccess();
    void onWpsEventSuccess();

    /**
     * Used to indicate that the AP has cleared all DSCP requests
     * associated with this device.
     */
    oneway void onQosPolicyReset();
    void onQosPolicyReset();

    /**
     * Used to indicate a DSCP request was received from the AP.
     *
     * @param qosPolicyData QoS policies info requested by the AP.
     */
    oneway void onQosPolicyRequest(in QosPolicyData[] qosPolicyData);
    void onQosPolicyRequest(in QosPolicyData[] qosPolicyData);
}
Loading