Documentation
¶
Overview ¶
Package hwservicemanager provides a client for Android's HIDL hwservicemanager, which runs on /dev/hwbinder at handle 0. It allows looking up HIDL HAL services by their versioned fully-qualified names (e.g. "android.hardware.graphics.allocator@3.0::IAllocator/default").
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransactHidl ¶
func TransactHidl( ctx context.Context, transport binder.Transport, handle uint32, code binder.TransactionCode, hp *hwparcel.HwParcel, ) (*parcel.Parcel, error)
TransactHidl performs a raw HIDL transaction on a handle obtained from GetService. The caller builds an HwParcel with the request data.
Types ¶
type HwServiceManager ¶
type HwServiceManager struct {
// contains filtered or unexported fields
}
HwServiceManager provides access to Android's HIDL hwservicemanager.
func New ¶
func New(transport binder.Transport) *HwServiceManager
New creates a HwServiceManager client using the given transport (which must be connected to /dev/hwbinder).
func (*HwServiceManager) GetService ¶
func (sm *HwServiceManager) GetService( ctx context.Context, fqName string, instance string, ) (_ uint32, _err error)
GetService retrieves a HIDL service by its fully-qualified name and instance. fqName is e.g. "android.hardware.graphics.allocator@3.0::IAllocator" instance is e.g. "default"