diff options
Diffstat (limited to 'gnss/2.0/IAGnssCallback.hal')
-rw-r--r-- | gnss/2.0/IAGnssCallback.hal | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnss/2.0/IAGnssCallback.hal b/gnss/2.0/IAGnssCallback.hal new file mode 100644 index 0000000000..896be1802f --- /dev/null +++ b/gnss/2.0/IAGnssCallback.hal @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.gnss@2.0; + +/** Callback structure for the AGNSS interface. */ +interface IAGnssCallback { + /** AGNSS service type **/ + enum AGnssType : uint8_t { + SUPL = 1, + C2K = 2, + SUPL_EIMS = 3, + SUPL_IMS = 4, + }; + + enum AGnssStatusValue : uint8_t { + /** GNSS requests data connection for AGNSS. */ + REQUEST_AGNSS_DATA_CONN = 1, + /** GNSS releases the AGNSS data connection. */ + RELEASE_AGNSS_DATA_CONN = 2, + /** AGNSS data connection initiated */ + AGNSS_DATA_CONNECTED = 3, + /** AGNSS data connection completed */ + AGNSS_DATA_CONN_DONE = 4, + /** AGNSS data connection failed */ + AGNSS_DATA_CONN_FAILED = 5 + }; + + /** + * Callback with AGNSS status information. + * + * The GNSS HAL implementation must use this method to request the framework to setup + * network connection for the specified AGNSS service and to update the connection + * status so that the framework can release the resources. + * + * @param type Type of AGNSS service. + * @parama status Status of the data connection. + */ + agnssStatusCb(AGnssType type, AGnssStatusValue status); +};
\ No newline at end of file |