Documentation
¶
Index ¶
- Constants
- type BootControlProxy
- func (p *BootControlProxy) AsBinder() binder.IBinder
- func (p *BootControlProxy) GetActiveBootSlot(ctx context.Context) (int32, error)
- func (p *BootControlProxy) GetCurrentSlot(ctx context.Context) (int32, error)
- func (p *BootControlProxy) GetNumberSlots(ctx context.Context) (int32, error)
- func (p *BootControlProxy) GetSnapshotMergeStatus(ctx context.Context) (MergeStatus, error)
- func (p *BootControlProxy) GetSuffix(ctx context.Context, slot int32) (string, error)
- func (p *BootControlProxy) IsSlotBootable(ctx context.Context, slot int32) (bool, error)
- func (p *BootControlProxy) IsSlotMarkedSuccessful(ctx context.Context, slot int32) (bool, error)
- func (p *BootControlProxy) MarkBootSuccessful(ctx context.Context) error
- func (p *BootControlProxy) SetActiveBootSlot(ctx context.Context, slot int32) error
- func (p *BootControlProxy) SetSlotAsUnbootable(ctx context.Context, slot int32) error
- func (p *BootControlProxy) SetSnapshotMergeStatus(ctx context.Context, status MergeStatus) error
- type BootControlStub
- type IBootControl
- type IBootControlServer
- type MergeStatus
Constants ¶
View Source
const ( TransactionIBootControlGetActiveBootSlot = binder.FirstCallTransaction + 0 TransactionIBootControlGetCurrentSlot = binder.FirstCallTransaction + 1 TransactionIBootControlGetNumberSlots = binder.FirstCallTransaction + 2 TransactionIBootControlGetSnapshotMergeStatus = binder.FirstCallTransaction + 3 TransactionIBootControlGetSuffix = binder.FirstCallTransaction + 4 TransactionIBootControlIsSlotBootable = binder.FirstCallTransaction + 5 TransactionIBootControlIsSlotMarkedSuccessful = binder.FirstCallTransaction + 6 TransactionIBootControlMarkBootSuccessful = binder.FirstCallTransaction + 7 TransactionIBootControlSetActiveBootSlot = binder.FirstCallTransaction + 8 TransactionIBootControlSetSlotAsUnbootable = binder.FirstCallTransaction + 9 TransactionIBootControlSetSnapshotMergeStatus = binder.FirstCallTransaction + 10 )
View Source
const ( MethodIBootControlGetActiveBootSlot = "getActiveBootSlot" MethodIBootControlGetCurrentSlot = "getCurrentSlot" MethodIBootControlGetNumberSlots = "getNumberSlots" MethodIBootControlGetSnapshotMergeStatus = "getSnapshotMergeStatus" MethodIBootControlGetSuffix = "getSuffix" MethodIBootControlIsSlotBootable = "isSlotBootable" MethodIBootControlIsSlotMarkedSuccessful = "isSlotMarkedSuccessful" MethodIBootControlMarkBootSuccessful = "markBootSuccessful" MethodIBootControlSetActiveBootSlot = "setActiveBootSlot" MethodIBootControlSetSlotAsUnbootable = "setSlotAsUnbootable" MethodIBootControlSetSnapshotMergeStatus = "setSnapshotMergeStatus" )
View Source
const ( IBootControlInvalidSlot int32 = -1 IBootControlCommandFailed int32 = -2 )
View Source
const DescriptorIBootControl = "android.hardware.boot.IBootControl"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootControlProxy ¶
func NewBootControlProxy ¶
func NewBootControlProxy( remote binder.IBinder, ) *BootControlProxy
func (*BootControlProxy) AsBinder ¶
func (p *BootControlProxy) AsBinder() binder.IBinder
func (*BootControlProxy) GetActiveBootSlot ¶
func (p *BootControlProxy) GetActiveBootSlot( ctx context.Context, ) (int32, error)
func (*BootControlProxy) GetCurrentSlot ¶
func (p *BootControlProxy) GetCurrentSlot( ctx context.Context, ) (int32, error)
func (*BootControlProxy) GetNumberSlots ¶
func (p *BootControlProxy) GetNumberSlots( ctx context.Context, ) (int32, error)
func (*BootControlProxy) GetSnapshotMergeStatus ¶
func (p *BootControlProxy) GetSnapshotMergeStatus( ctx context.Context, ) (MergeStatus, error)
func (*BootControlProxy) IsSlotBootable ¶
func (*BootControlProxy) IsSlotMarkedSuccessful ¶
func (*BootControlProxy) MarkBootSuccessful ¶
func (p *BootControlProxy) MarkBootSuccessful( ctx context.Context, ) error
func (*BootControlProxy) SetActiveBootSlot ¶
func (p *BootControlProxy) SetActiveBootSlot( ctx context.Context, slot int32, ) error
func (*BootControlProxy) SetSlotAsUnbootable ¶
func (p *BootControlProxy) SetSlotAsUnbootable( ctx context.Context, slot int32, ) error
func (*BootControlProxy) SetSnapshotMergeStatus ¶
func (p *BootControlProxy) SetSnapshotMergeStatus( ctx context.Context, status MergeStatus, ) error
type BootControlStub ¶
type BootControlStub struct {
Impl IBootControl
Transport binder.VersionAwareTransport
}
BootControlStub dispatches incoming binder transactions to a typed IBootControl implementation.
func (*BootControlStub) Descriptor ¶
func (s *BootControlStub) Descriptor() string
func (*BootControlStub) OnTransaction ¶
func (s *BootControlStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type IBootControl ¶
type IBootControl interface {
AsBinder() binder.IBinder
GetActiveBootSlot(ctx context.Context) (int32, error)
GetCurrentSlot(ctx context.Context) (int32, error)
GetNumberSlots(ctx context.Context) (int32, error)
GetSnapshotMergeStatus(ctx context.Context) (MergeStatus, error)
GetSuffix(ctx context.Context, slot int32) (string, error)
IsSlotBootable(ctx context.Context, slot int32) (bool, error)
IsSlotMarkedSuccessful(ctx context.Context, slot int32) (bool, error)
MarkBootSuccessful(ctx context.Context) error
SetActiveBootSlot(ctx context.Context, slot int32) error
SetSlotAsUnbootable(ctx context.Context, slot int32) error
SetSnapshotMergeStatus(ctx context.Context, status MergeStatus) error
}
func NewBootControlStub ¶
func NewBootControlStub( impl IBootControlServer, ) IBootControl
NewBootControlStub creates a server-side IBootControl wrapping the given server implementation. The returned value satisfies IBootControl and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IBootControlServer ¶
type IBootControlServer interface {
GetActiveBootSlot(ctx context.Context) (int32, error)
GetCurrentSlot(ctx context.Context) (int32, error)
GetNumberSlots(ctx context.Context) (int32, error)
GetSnapshotMergeStatus(ctx context.Context) (MergeStatus, error)
GetSuffix(ctx context.Context, slot int32) (string, error)
IsSlotBootable(ctx context.Context, slot int32) (bool, error)
IsSlotMarkedSuccessful(ctx context.Context, slot int32) (bool, error)
MarkBootSuccessful(ctx context.Context) error
SetActiveBootSlot(ctx context.Context, slot int32) error
SetSlotAsUnbootable(ctx context.Context, slot int32) error
SetSnapshotMergeStatus(ctx context.Context, status MergeStatus) error
}
IBootControlServer is the server-side interface that user implementations provide to NewBootControlStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type MergeStatus ¶
type MergeStatus int32
const ( MergeStatusNONE MergeStatus = 0 MergeStatusUNKNOWN MergeStatus = 1 MergeStatusSNAPSHOTTED MergeStatus = 2 MergeStatusMERGING MergeStatus = 3 MergeStatusCANCELLED MergeStatus = 4 )
Click to show internal directories.
Click to hide internal directories.