summaryrefslogtreecommitdiff
path: root/aidl
diff options
context:
space:
mode:
author Gabriel Biren <gbiren@google.com> 2024-12-04 20:31:27 +0000
committer Gabriel Biren <gbiren@google.com> 2024-12-05 20:12:06 +0000
commitdb24d146dcfa90c200b9cc3842dd8f9a9d3f01ed (patch)
tree72e1b17acb9cc059ff2784c7eab465abdb88f141 /aidl
parentac914b9c3566be3b0b5c37b0f2929d029af6cf81 (diff)
Add USD methods to the Mainline Supplicant
Unstable AIDL interface. Definitions are copied directly from the ones added to the Vendor Supplicant in ag/30346475. Bug: 365585450 Flag: EXEMPT change to AIDL interface Test: m Change-Id: If3ab0c5d63080bb4a16b51f7abf0e8d54e03b3d2
Diffstat (limited to 'aidl')
-rw-r--r--aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdCallback.aidl76
-rw-r--r--aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdInterface.aidl77
2 files changed, 153 insertions, 0 deletions
diff --git a/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdCallback.aidl b/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdCallback.aidl
index fd396a71d0..c5752a3765 100644
--- a/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdCallback.aidl
+++ b/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdCallback.aidl
@@ -92,4 +92,80 @@ interface IUsdCallback {
*/
INVALID_ARGS = 3
}
+
+ /**
+ * Called in response to |IUsdInterface.startPublish| to indicate that the
+ * publish session was started successfully.
+ *
+ * @param cmdId Identifier for the original request.
+ * @param publishId Identifier for the publish session.
+ */
+ void onPublishStarted(in int cmdId, in int publishId);
+
+ /**
+ * Called in response to |IUsdInterface.startSubscribe| to indicate that the
+ * subscribe session was started successfully.
+ *
+ * @param cmdId Identifier for the original request.
+ * @param subscribeId Identifier for the subscribe session.
+ */
+ void onSubscribeStarted(in int cmdId, in int subscribeId);
+
+ /**
+ * Called in response to |IUsdInterface.startPublish| to indicate that the
+ * publish session could not be configured.
+ *
+ * @param cmdId Identifier for the original request.
+ */
+ void onPublishConfigFailed(in int cmdId);
+
+ /**
+ * Called in response to |IUsdInterface.startSubscribe| to indicate that the
+ * subscribe session could not be configured.
+ *
+ * @param cmdId Identifier for the original request.
+ */
+ void onSubscribeConfigFailed(in int cmdId);
+
+ /**
+ * Called in response to |IUsdInterface.cancelPublish| to indicate that the session
+ * was cancelled successfully. May also be called unsolicited if the session terminated
+ * by supplicant.
+ *
+ * @param publishId Identifier for the publish session.
+ * @param reasonCode Code indicating the reason for the session cancellation.
+ */
+ void onPublishTerminated(in int publishId, in UsdReasonCode reasonCode);
+
+ /**
+ * Called in response to |IUsdInterface.cancelSubscribe| to indicate that the session
+ * was cancelled successfully. May also be called unsolicited if the session terminated
+ * by supplicant.
+ *
+ * @param subscribeId Identifier for the subscribe session.
+ * @param reasonCode Code indicating the reason for the session cancellation.
+ */
+ void onSubscribeTerminated(in int subscribeId, in UsdReasonCode reasonCode);
+
+ /**
+ * Indicates that the publisher sent solicited publish message to the subscriber.
+ *
+ * @param info Instance of |UsdServiceDiscoveryInfo| containing information about the reply.
+ */
+ void onPublishReplied(in UsdServiceDiscoveryInfo info);
+
+ /**
+ * Indicates that a publisher was discovered. Only called if this device is acting as a
+ * subscriber.
+ *
+ * @param info Instance of |UsdServiceDiscoveryInfo| containing information about the service.
+ */
+ void onServiceDiscovered(in UsdServiceDiscoveryInfo info);
+
+ /**
+ * Indicates that a message was received on an active USD link.
+ *
+ * @param messageInfo Information about the message that was received.
+ */
+ void onMessageReceived(in UsdMessageInfo messageInfo);
}
diff --git a/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdInterface.aidl b/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdInterface.aidl
index 46b124ea30..50a0141117 100644
--- a/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdInterface.aidl
+++ b/aidl/mainline_supplicant/android/system/wifi/mainline_supplicant/IUsdInterface.aidl
@@ -239,4 +239,81 @@ interface IUsdInterface {
*/
PublishTransmissionType transmissionType;
}
+
+ /**
+ * Retrieve capabilities related to Unsynchronized Service Discovery (USD).
+ *
+ * @return Instance of |UsdCapabilities| containing the capability info.
+ */
+ UsdCapabilities getUsdCapabilities();
+
+ /**
+ * Start a USD publish session. Triggers a response via |IUsdCallback.onPublishStarted|
+ * if successful, or |IUsdCallback.onPublishConfigFailed| if failed.
+ *
+ * @param cmdId Identifier for this request. Will be returned in the callback to identify
+ * the request.
+ * @param usdPublishConfig Parameters for the requested publish session.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void startUsdPublish(in int cmdId, in PublishConfig usdPublishConfig);
+
+ /**
+ * Start a USD subscribe session. Triggers a response via |IUsdCallback.onSubscribeStarted|
+ * if successful, or |IUsdCallback.onSubscribeConfigFailed| if failed.
+ *
+ * @param cmdId Identifier for this request. Will be returned in the callback to identify
+ * the request.
+ * @param usdSubscribeConfig Parameters for the requested subscribe session.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void startUsdSubscribe(in int cmdId, in SubscribeConfig usdSubscribeConfig);
+
+ /**
+ * Update the service-specific info for an active publish session.
+ *
+ * @param publishId Identifier for the active publish session.
+ * @param serviceSpecificInfo Byte array containing the service-specific info. Note that the
+ * maximum info length is |UsdCapabilities.maxLocalSsiLengthBytes|.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void updateUsdPublish(in int publishId, in byte[] serviceSpecificInfo);
+
+ /**
+ * Cancel an existing USD publish session. |IUsdCallback.onPublishTerminated|
+ * will be called upon completion.
+ *
+ * @param publishId Identifier for the publish session to cancel.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void cancelUsdPublish(in int publishId);
+
+ /**
+ * Cancel an existing USD subscribe session.
+ * |IUsdCallback.onSubscribeTerminated| will be called upon completion.
+ *
+ * @param subscribeId Identifier for the subscribe session to cancel.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void cancelUsdSubscribe(in int subscribeId);
+
+ /**
+ * Send a message to a peer device across an active USD link.
+ *
+ * @param messageInfo Information for the message to be sent.
+ * @throws ServiceSpecificException with one of the following values:
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
+ */
+ void sendUsdMessage(in UsdMessageInfo messageInfo);
}