Stay organized with collections
Save and categorize content based on your preferences.
ndk::ScopedAStatus
#include <binder_auto_utils.h>
Convenience wrapper.
Summary
See AStatus.
Inheritance
Inherits from:
ndk::impl::ScopedAResource< AStatus *, AStatus_delete, nullptr >Public functions
ScopedAStatus
ScopedAStatus(
AStatus *a
)
Takes ownership of a.
WARNING: this constructor is only expected to be used when reading a status value. Use ScopedAStatus::ok()
instead.
getDescription
std::string getDescription() const
getExceptionCode
binder_exception_t getExceptionCode() const
See AStatus_getExceptionCode.
getMessage
const char * getMessage() const
getServiceSpecificError
int32_t getServiceSpecificError() const
See AStatus_getServiceSpecificError.
~ScopedAStatus
~ScopedAStatus()
Public static functions
fromServiceSpecificError
ScopedAStatus fromServiceSpecificError(
int32_t serviceSpecific
)
fromServiceSpecificErrorWithMessage
ScopedAStatus fromServiceSpecificErrorWithMessage(
int32_t serviceSpecific,
const char *message
)
ok
ScopedAStatus ok()
Convenience methods for creating scoped statuses.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-17 UTC."],[],[],null,["# ndk::ScopedAStatus Class Reference\n\nndk::ScopedAStatus\n==================\n\n\n`#include \u003cbinder_auto_utils.h\u003e`\n\nConvenience wrapper.\n\nSummary\n-------\n\nSee AStatus.\n\n### Inheritance\n\nInherits from: [ndk::impl::ScopedAResource\\\u003c AStatus \\*, AStatus_delete, nullptr \\\u003e](/ndk/reference/classndk/1-1impl-1-1-scoped-a-resource)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ScopedAStatus](#classndk_1_1_scoped_a_status_1a5a0422154576ea0b28ca5d3f075a3a63)`(AStatus *a)` Takes ownership of a. ||\n| [ScopedAStatus](#classndk_1_1_scoped_a_status_1a38f5d438c7148b838bf16d96d371732f)`(`[ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status)` &&)` ||\n| [~ScopedAStatus](#classndk_1_1_scoped_a_status_1ae3c9617cbd28f256bf6862318ac5542b)`()` ||\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [getDescription](#classndk_1_1_scoped_a_status_1acf0d496b456b933a2dc43cb96a05395c)`() const ` | `std::string` |\n| [getExceptionCode](#classndk_1_1_scoped_a_status_1adfdac1e326dc2799bba88354ac63c99a)`() const ` | [binder_exception_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1gae15fae7cc96a8b3f0b699523962c09c2) See AStatus_getExceptionCode. |\n| [getMessage](#classndk_1_1_scoped_a_status_1a8838d20472954226b1a453c366e44e6f)`() const ` | `const char *` See AStatus_getMessage. |\n| [getServiceSpecificError](#classndk_1_1_scoped_a_status_1a0795e3107bcce4cbae44cbe52385276f)`() const ` | `int32_t` See AStatus_getServiceSpecificError. |\n| [getStatus](#classndk_1_1_scoped_a_status_1a26e80a36d3c200aa6fb71bb83ff27b02)`() const ` | [binder_status_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1ga26845d019135385e22a356743fdf639f) See AStatus_getStatus. |\n| [isOk](#classndk_1_1_scoped_a_status_1af9a95b2270a0309ce46f90f13242b51a)`() const ` | `bool` See AStatus_isOk. |\n| [operator=](#classndk_1_1_scoped_a_status_1a0ee9ee06ec04d164e3faa89cd6f7d4e1)`(`[ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status)` &&)=default` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status)` &` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [fromExceptionCode](#classndk_1_1_scoped_a_status_1a2000b9023465907e4909d28e77cba926)`(`[binder_exception_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1gae15fae7cc96a8b3f0b699523962c09c2)` exception)` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) |\n| [fromExceptionCodeWithMessage](#classndk_1_1_scoped_a_status_1a934345f2a4adbcff9b77dc161af55059)`(`[binder_exception_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1gae15fae7cc96a8b3f0b699523962c09c2)` exception, const char *message)` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) |\n| [fromServiceSpecificError](#classndk_1_1_scoped_a_status_1a4cad6eed0da6a8ac4b5c4227f52ac1c9)`(int32_t serviceSpecific)` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) |\n| [fromServiceSpecificErrorWithMessage](#classndk_1_1_scoped_a_status_1a035bc841dc92d0be345e36f6ee06e70a)`(int32_t serviceSpecific, const char *message)` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) |\n| [fromStatus](#classndk_1_1_scoped_a_status_1a84d8b005a82aada022da65abb779c5eb)`(`[binder_status_t](/ndk/reference/group/ndk-binder#group___ndk_binder_1ga26845d019135385e22a356743fdf639f)` status)` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) |\n| [ok](#classndk_1_1_scoped_a_status_1afd4faef746172297ba58e6375affa7fb)`()` | [ScopedAStatus](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status) Convenience methods for creating scoped statuses. |\n\nPublic functions\n----------------\n\n### ScopedAStatus\n\n```scdoc\n ScopedAStatus(\n AStatus *a\n)\n``` \nTakes ownership of a.\n\nWARNING: this constructor is only expected to be used when reading a status value. Use [ScopedAStatus::ok()](/ndk/reference/classndk/1-1-scoped-a-status#classndk_1_1_scoped_a_status_1afd4faef746172297ba58e6375affa7fb) instead. \n\n### ScopedAStatus\n\n```text\n ScopedAStatus(\n ScopedAStatus &&\n)=default\n``` \n\n### getDescription\n\n```gdscript\nstd::string getDescription() const \n``` \n\n### getExceptionCode\n\n```gdscript\nbinder_exception_t getExceptionCode() const \n``` \nSee AStatus_getExceptionCode. \n\n### getMessage\n\n```gdscript\nconst char * getMessage() const \n``` \nSee AStatus_getMessage. \n\n### getServiceSpecificError\n\n```gdscript\nint32_t getServiceSpecificError() const \n``` \nSee AStatus_getServiceSpecificError. \n\n### getStatus\n\n```gdscript\nbinder_status_t getStatus() const \n``` \nSee AStatus_getStatus. \n\n### isOk\n\n```gdscript\nbool isOk() const \n``` \nSee AStatus_isOk. \n\n### operator=\n\n```text\nScopedAStatus & operator=(\n ScopedAStatus &&\n)=default\n``` \n\n### \\~ScopedAStatus\n\n```text\n ~ScopedAStatus()\n``` \n\nPublic static functions\n-----------------------\n\n### fromExceptionCode\n\n```scdoc\nScopedAStatus fromExceptionCode(\n binder_exception_t exception\n)\n``` \n\n### fromExceptionCodeWithMessage\n\n```gdscript\nScopedAStatus fromExceptionCodeWithMessage(\n binder_exception_t exception,\n const char *message\n)\n``` \n\n### fromServiceSpecificError\n\n```scdoc\nScopedAStatus fromServiceSpecificError(\n int32_t serviceSpecific\n)\n``` \n\n### fromServiceSpecificErrorWithMessage\n\n```gdscript\nScopedAStatus fromServiceSpecificErrorWithMessage(\n int32_t serviceSpecific,\n const char *message\n)\n``` \n\n### fromStatus\n\n```scdoc\nScopedAStatus fromStatus(\n binder_status_t status\n)\n``` \n\n### ok\n\n```text\nScopedAStatus ok()\n``` \nConvenience methods for creating scoped statuses."]]