اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
مرجع بنية GpsNavigationMessageInterface
#include <
gps.h
>
واجهة موسّعة تتيح الإبلاغ عن رسائل التنقّل باستخدام نظام تحديد المواقع العالمي (GPS)
التعريف في السطر
2157
من الملف
gps.h
.
يوقف التحديثات الواردة من HAL، ويُلغي تسجيل سلاسل إجراءات طلب معاودة الاتصال. بعد طلب الإيقاف، يجب أن تعتبر HAL عمليات تسجيل الإشعارات السابقة غير صالحة. في حال استدعاء stop بدون "init" سابق، من المفترض ألا تؤدي هذه الدالة أي عمل.
التعريف في السطر
2181
من الملف
gps.h
.
يبدأ تشغيل الواجهة ويُسجِّل إجراءات الاستدعاء مع HAL. بعد إجراء طلب ناجح لـ "init"، يجب أن يبدأ HAL في تقديم التحديثات فور توفّرها.
الحالة: GPS_NAVIGATION_MESSAGE_OPERATION_SUCCESS GPS_NAVIGATION_MESSAGE_ERROR_ALREADY_INIT - إذا سبق أن تم تسجيل طلب استدعاء بدون طلب مقابل لـ "إغلاق". GPS_NAVIGATION_MESSAGE_ERROR_GENERIC: في حال حدوث أي خطأ آخر، من المتوقّع ألا يُنشئ HAL أي تعديلات عند عرض رمز الخطأ هذا.
التعريف في السطر
2173
من الملف
gps.h
.
اضبط القيمة على sizeof(GpsNavigationMessageInterface).
التعريف في السطر
2159
من الملف
gps.h
.
تم إنشاء مستندات هذه البنية من الملف التالي:
-
hardware/libhardware/include/hardware/
gps.h
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Android Hardware Abstraction Layer: GpsNavigationMessageInterface Struct Reference\n\nGpsNavigationMessageInterface Struct Reference\n==============================================\n\n[Data Fields](#pub-attribs) \nGpsNavigationMessageInterface 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_gps_navigation_message_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| int(\\* | [init](/reference/hal/struct_gps_navigation_message_interface#aff4b47b76fd1ebedee4ef8f23e1fd850) )( [GpsNavigationMessageCallbacks](/reference/hal/struct_gps_navigation_message_callbacks) \\*callbacks) |\n| ||\n| void(\\* | [close](/reference/hal/struct_gps_navigation_message_interface#a9736ff1cda7d1d558f5cd251e0049c49) )() |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nExtended interface for GPS navigation message reporting support.\n\n\nDefinition at line\n[2157](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| void(\\* close)() |\n\n\nStops updates from the HAL, and unregisters the callback routines. After a call to stop, the previously registered callbacks must be considered invalid by the HAL. If stop is invoked without a previous 'init', this function should perform no work.\n\n\nDefinition at line\n[2181](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(\\* init)( [GpsNavigationMessageCallbacks](/reference/hal/struct_gps_navigation_message_callbacks) \\*callbacks) |\n\n\nInitializes the interface and registers the callback routines with the HAL. After a successful call to 'init' the HAL must begin to provide updates as they become available.\n\n\nStatus: GPS_NAVIGATION_MESSAGE_OPERATION_SUCCESS GPS_NAVIGATION_MESSAGE_ERROR_ALREADY_INIT - if a callback has already been registered without a corresponding call to 'close'. GPS_NAVIGATION_MESSAGE_ERROR_GENERIC - if any other error occurred, it is expected that the HAL will not generate any updates upon returning this error code.\n\n\nDefinition at line\n[2173](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(GpsNavigationMessageInterface)\n\n\nDefinition at line\n[2159](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)"]]