ndk::ScopedAStatus

#include <binder_auto_utils.h>

Convenience wrapper.

Summary

See AStatus.

Inheritance

Inherits from: ndk::impl::ScopedAResource< AStatus *, AStatus_delete, nullptr >

Constructors and Destructors

ScopedAStatus(AStatus *a)
Takes ownership of a.
ScopedAStatus(ScopedAStatus &&)
~ScopedAStatus()

Public functions

getDescription() const
std::string
getExceptionCode() const
See AStatus_getExceptionCode.
getMessage() const
const char *
See AStatus_getMessage.
getServiceSpecificError() const
int32_t
See AStatus_getServiceSpecificError.
getStatus() const
See AStatus_getStatus.
isOk() const
bool
See AStatus_isOk.
operator=(ScopedAStatus &&)=default

Public static functions

fromExceptionCode(binder_exception_t exception)
fromExceptionCodeWithMessage(binder_exception_t exception, const char *message)
fromServiceSpecificError(int32_t serviceSpecific)
fromServiceSpecificErrorWithMessage(int32_t serviceSpecific, const char *message)
fromStatus(binder_status_t status)
ok()
Convenience methods for creating scoped statuses.

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.

ScopedAStatus

 ScopedAStatus(
  ScopedAStatus &&
)=default

getDescription

std::string getDescription() const 

getExceptionCode

binder_exception_t getExceptionCode() const 

See AStatus_getExceptionCode.

getMessage

const char * getMessage() const 

See AStatus_getMessage.

getServiceSpecificError

int32_t getServiceSpecificError() const 

See AStatus_getServiceSpecificError.

getStatus

binder_status_t getStatus() const 

See AStatus_getStatus.

isOk

bool isOk() const 

See AStatus_isOk.

operator=

ScopedAStatus & operator=(
  ScopedAStatus &&
)=default

~ScopedAStatus

 ~ScopedAStatus()

Public static functions

fromExceptionCode

ScopedAStatus fromExceptionCode(
  binder_exception_t exception
)

fromExceptionCodeWithMessage

ScopedAStatus fromExceptionCodeWithMessage(
  binder_exception_t exception,
  const char *message
)

fromServiceSpecificError

ScopedAStatus fromServiceSpecificError(
  int32_t serviceSpecific
)

fromServiceSpecificErrorWithMessage

ScopedAStatus fromServiceSpecificErrorWithMessage(
  int32_t serviceSpecific,
  const char *message
)

fromStatus

ScopedAStatus fromStatus(
  binder_status_t status
)

ok

ScopedAStatus ok()

Convenience methods for creating scoped statuses.