Начиная с 27 марта 2025 г. мы рекомендуем использовать android-latest-release
вместо aosp-main
для создания и участия в AOSP. Дополнительные сведения см. в разделе Изменения в AOSP .
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Справочник по структуре AGpsInterface
#include < gps.h >
Расширенный интерфейс для поддержки AGPS, он дополнен возможностью передачи дополнительных данных APN.
Определение в строке 921 файла gps.h.
int(* data_conn_closed)() |
Уведомляет, что соединение для передачи данных AGPS закрыто.
Определение в строке 939 файла gps.h.
int(* data_conn_failed)() |
Уведомляет, что подключение для передачи данных недоступно для AGPS.
Определение в строке 943 файла gps.h.
int(* data_conn_open)(const char *apn) |
Устарело. Если HAL поддерживает AGpsInterface_v2, этот API не будет использоваться, дополнительную информацию см. в data_conn_open_with_apn_ip_type.
Определение в строке 935 файла gps.h.
int(* data_conn_open_with_apn_ip_type)(const char *apn, ApnIpType apnIpType) |
Уведомляет о доступности подключения для передачи данных и устанавливает имя точки доступа и ее тип IP, которые будут использоваться для подключений SUPL.
Определение в строке 953 файла gps.h.
Открывает интерфейс AGPS и предоставляет процедуры обратного вызова для реализации этого интерфейса.
Определение в строке 929 файла gps.h.
int(* set_server)(тип AGpsType , const char *имя хоста, int порт) |
Устанавливает имя хоста и порт для сервера AGPS.
Определение в строке 947 файла gps.h.
установить sizeof(AGpsInterface)
Определение в строке 923 файла gps.h.
Документация для этой структуры была создана из следующего файла:
- оборудование/libhardware/include/hardware/ gps.h
Контент и образцы кода на этой странице предоставлены по лицензиям. Java и OpenJDK – это зарегистрированные товарные знаки корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-29 UTC.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-29 UTC."],[],[],null,["# Android Hardware Abstraction Layer: AGpsInterface Struct Reference\n\nAGpsInterface Struct Reference\n==============================\n\n[Data Fields](#pub-attribs) \nAGpsInterface Struct Reference \n\n`\n#include \u003c\n`[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)`\n\u003e\n`\n\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/struct_a_gps_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| void(\\* | [init](/reference/hal/struct_a_gps_interface#a72feb2719b8809d7064eac96b4a5fb8f) )( [AGpsCallbacks](/reference/hal/struct_a_gps_callbacks) \\*callbacks) |\n| ||\n| int(\\* | [data_conn_open](/reference/hal/struct_a_gps_interface#a591c421c92b4628d493f1ae55a1ab6d9) )(const char \\*apn) |\n| ||\n| int(\\* | [data_conn_closed](/reference/hal/struct_a_gps_interface#aa413d6d9fe05cd2bd9c1f531c3f37bf7) )() |\n| ||\n| int(\\* | [data_conn_failed](/reference/hal/struct_a_gps_interface#a5b66d04a0b8ab39e01d3f3ec4e6e0c97) )() |\n| ||\n| int(\\* | [set_server](/reference/hal/struct_a_gps_interface#a9723f353ecadc2b585cd58f0c60012ae) )( [AGpsType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) type, const char \\*hostname, int port) |\n| ||\n| int(\\* | [data_conn_open_with_apn_ip_type](/reference/hal/struct_a_gps_interface#a19322cf8f0b053595e62cbd79cc9d00d) )(const char \\*apn, [ApnIpType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) apnIpType) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nExtended interface for AGPS support, it is augmented to enable to pass extra APN data.\n\n\nDefinition at line\n[921](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\nField Documentation\n-------------------\n\n\n|----------------------------|\n| int(\\* data_conn_closed)() |\n\n\nNotifies that the AGPS data connection has been closed.\n\n\nDefinition at line\n[939](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|----------------------------|\n| int(\\* data_conn_failed)() |\n\n\nNotifies that a data connection is not available for AGPS.\n\n\nDefinition at line\n[943](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|------------------------------------------|\n| int(\\* data_conn_open)(const char \\*apn) |\n\n\nDeprecated. If the HAL supports AGpsInterface_v2 this API will not be used, see data_conn_open_with_apn_ip_type for more information.\n\n\nDefinition at line\n[935](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* data_conn_open_with_apn_ip_type)(const char \\*apn, [ApnIpType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) apnIpType) |\n\n\nNotifies that a data connection is available and sets the name of the APN, and its IP type, to be used for SUPL connections.\n\n\nDefinition at line\n[953](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|------------------------------------------------------------------------------------|\n| void(\\* init)( [AGpsCallbacks](/reference/hal/struct_a_gps_callbacks) \\*callbacks) |\n\n\nOpens the AGPS interface and provides the callback routines to the implementation of this interface.\n\n\nDefinition at line\n[929](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* set_server)( [AGpsType](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h) type, const char \\*hostname, int port) |\n\n\nSets the hostname and port for the AGPS server.\n\n\nDefinition at line\n[947](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-------------|\n| size_t size |\n\n\nset to sizeof(AGpsInterface)\n\n\nDefinition at line\n[923](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)"]]