remoteaccess

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIRemoteAccessGetVehicleId                       = binder.FirstCallTransaction + 0
	TransactionIRemoteAccessGetWakeupServiceName               = binder.FirstCallTransaction + 1
	TransactionIRemoteAccessGetProcessorId                     = binder.FirstCallTransaction + 2
	TransactionIRemoteAccessSetRemoteTaskCallback              = binder.FirstCallTransaction + 3
	TransactionIRemoteAccessClearRemoteTaskCallback            = binder.FirstCallTransaction + 4
	TransactionIRemoteAccessNotifyApStateChange                = binder.FirstCallTransaction + 5
	TransactionIRemoteAccessIsTaskScheduleSupported            = binder.FirstCallTransaction + 6
	TransactionIRemoteAccessGetSupportedTaskTypesForScheduling = binder.FirstCallTransaction + 7
	TransactionIRemoteAccessScheduleTask                       = binder.FirstCallTransaction + 8
	TransactionIRemoteAccessUnscheduleTask                     = binder.FirstCallTransaction + 9
	TransactionIRemoteAccessUnscheduleAllTasks                 = binder.FirstCallTransaction + 10
	TransactionIRemoteAccessIsTaskScheduled                    = binder.FirstCallTransaction + 11
	TransactionIRemoteAccessGetAllPendingScheduledTasks        = binder.FirstCallTransaction + 12
)
View Source
const (
	MethodIRemoteAccessGetVehicleId                       = "getVehicleId"
	MethodIRemoteAccessGetWakeupServiceName               = "getWakeupServiceName"
	MethodIRemoteAccessGetProcessorId                     = "getProcessorId"
	MethodIRemoteAccessSetRemoteTaskCallback              = "setRemoteTaskCallback"
	MethodIRemoteAccessClearRemoteTaskCallback            = "clearRemoteTaskCallback"
	MethodIRemoteAccessNotifyApStateChange                = "notifyApStateChange"
	MethodIRemoteAccessIsTaskScheduleSupported            = "isTaskScheduleSupported"
	MethodIRemoteAccessGetSupportedTaskTypesForScheduling = "getSupportedTaskTypesForScheduling"
	MethodIRemoteAccessScheduleTask                       = "scheduleTask"
	MethodIRemoteAccessUnscheduleTask                     = "unscheduleTask"
	MethodIRemoteAccessUnscheduleAllTasks                 = "unscheduleAllTasks"
	MethodIRemoteAccessIsTaskScheduled                    = "isTaskScheduled"
	MethodIRemoteAccessGetAllPendingScheduledTasks        = "getAllPendingScheduledTasks"
)
View Source
const DescriptorIRemoteAccess = "android.hardware.automotive.remoteaccess.IRemoteAccess"
View Source
const DescriptorIRemoteTaskCallback = "android.hardware.automotive.remoteaccess.IRemoteTaskCallback"
View Source
const (
	MethodIRemoteTaskCallbackOnRemoteTaskRequested = "onRemoteTaskRequested"
)
View Source
const (
	ScheduleInfoMaxTaskDataSizeInBytes int32 = 10240
)
View Source
const (
	TransactionIRemoteTaskCallbackOnRemoteTaskRequested = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApState

type ApState struct {
	IsReadyForRemoteTask bool
	IsWakeupRequired     bool
}

func (*ApState) MarshalParcel

func (s *ApState) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ApState) UnmarshalParcel

func (s *ApState) UnmarshalParcel(
	p *parcel.Parcel,
) error

type IRemoteAccess

type IRemoteAccess interface {
	AsBinder() binder.IBinder
	GetVehicleId(ctx context.Context) (string, error)
	GetWakeupServiceName(ctx context.Context) (string, error)
	GetProcessorId(ctx context.Context) (string, error)
	SetRemoteTaskCallback(ctx context.Context, callback IRemoteTaskCallback) error
	ClearRemoteTaskCallback(ctx context.Context) error
	NotifyApStateChange(ctx context.Context, state ApState) error
	IsTaskScheduleSupported(ctx context.Context) (bool, error)
	GetSupportedTaskTypesForScheduling(ctx context.Context) ([]TaskType, error)
	ScheduleTask(ctx context.Context, scheduleInfo ScheduleInfo) error
	UnscheduleTask(ctx context.Context, clientId string, scheduleId string) error
	UnscheduleAllTasks(ctx context.Context, clientId string) error
	IsTaskScheduled(ctx context.Context, clientId string, scheduleId string) (bool, error)
	GetAllPendingScheduledTasks(ctx context.Context, clientId string) ([]ScheduleInfo, error)
}

func NewRemoteAccessStub

func NewRemoteAccessStub(
	impl IRemoteAccessServer,
) IRemoteAccess

NewRemoteAccessStub creates a server-side IRemoteAccess wrapping the given server implementation. The returned value satisfies IRemoteAccess 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 IRemoteAccessServer

type IRemoteAccessServer interface {
	GetVehicleId(ctx context.Context) (string, error)
	GetWakeupServiceName(ctx context.Context) (string, error)
	GetProcessorId(ctx context.Context) (string, error)
	SetRemoteTaskCallback(ctx context.Context, callback IRemoteTaskCallback) error
	ClearRemoteTaskCallback(ctx context.Context) error
	NotifyApStateChange(ctx context.Context, state ApState) error
	IsTaskScheduleSupported(ctx context.Context) (bool, error)
	GetSupportedTaskTypesForScheduling(ctx context.Context) ([]TaskType, error)
	ScheduleTask(ctx context.Context, scheduleInfo ScheduleInfo) error
	UnscheduleTask(ctx context.Context, clientId string, scheduleId string) error
	UnscheduleAllTasks(ctx context.Context, clientId string) error
	IsTaskScheduled(ctx context.Context, clientId string, scheduleId string) (bool, error)
	GetAllPendingScheduledTasks(ctx context.Context, clientId string) ([]ScheduleInfo, error)
}

IRemoteAccessServer is the server-side interface that user implementations provide to NewRemoteAccessStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IRemoteTaskCallback

type IRemoteTaskCallback interface {
	AsBinder() binder.IBinder
	OnRemoteTaskRequested(ctx context.Context, clientId string, data []byte) error
}

func NewRemoteTaskCallbackStub

func NewRemoteTaskCallbackStub(
	impl IRemoteTaskCallbackServer,
) IRemoteTaskCallback

NewRemoteTaskCallbackStub creates a server-side IRemoteTaskCallback wrapping the given server implementation. The returned value satisfies IRemoteTaskCallback 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 IRemoteTaskCallbackServer

type IRemoteTaskCallbackServer interface {
	OnRemoteTaskRequested(ctx context.Context, clientId string, data []byte) error
}

IRemoteTaskCallbackServer is the server-side interface that user implementations provide to NewRemoteTaskCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type RemoteAccessProxy

type RemoteAccessProxy struct {
	Remote binder.IBinder
}

func NewRemoteAccessProxy

func NewRemoteAccessProxy(
	remote binder.IBinder,
) *RemoteAccessProxy

func (*RemoteAccessProxy) AsBinder

func (p *RemoteAccessProxy) AsBinder() binder.IBinder

func (*RemoteAccessProxy) ClearRemoteTaskCallback

func (p *RemoteAccessProxy) ClearRemoteTaskCallback(
	ctx context.Context,
) error

func (*RemoteAccessProxy) GetAllPendingScheduledTasks

func (p *RemoteAccessProxy) GetAllPendingScheduledTasks(
	ctx context.Context,
	clientId string,
) ([]ScheduleInfo, error)

func (*RemoteAccessProxy) GetProcessorId

func (p *RemoteAccessProxy) GetProcessorId(
	ctx context.Context,
) (string, error)

func (*RemoteAccessProxy) GetSupportedTaskTypesForScheduling

func (p *RemoteAccessProxy) GetSupportedTaskTypesForScheduling(
	ctx context.Context,
) ([]TaskType, error)

func (*RemoteAccessProxy) GetVehicleId

func (p *RemoteAccessProxy) GetVehicleId(
	ctx context.Context,
) (string, error)

func (*RemoteAccessProxy) GetWakeupServiceName

func (p *RemoteAccessProxy) GetWakeupServiceName(
	ctx context.Context,
) (string, error)

func (*RemoteAccessProxy) IsTaskScheduleSupported

func (p *RemoteAccessProxy) IsTaskScheduleSupported(
	ctx context.Context,
) (bool, error)

func (*RemoteAccessProxy) IsTaskScheduled

func (p *RemoteAccessProxy) IsTaskScheduled(
	ctx context.Context,
	clientId string,
	scheduleId string,
) (bool, error)

func (*RemoteAccessProxy) NotifyApStateChange

func (p *RemoteAccessProxy) NotifyApStateChange(
	ctx context.Context,
	state ApState,
) error

func (*RemoteAccessProxy) ScheduleTask

func (p *RemoteAccessProxy) ScheduleTask(
	ctx context.Context,
	scheduleInfo ScheduleInfo,
) error

func (*RemoteAccessProxy) SetRemoteTaskCallback

func (p *RemoteAccessProxy) SetRemoteTaskCallback(
	ctx context.Context,
	callback IRemoteTaskCallback,
) error

func (*RemoteAccessProxy) UnscheduleAllTasks

func (p *RemoteAccessProxy) UnscheduleAllTasks(
	ctx context.Context,
	clientId string,
) error

func (*RemoteAccessProxy) UnscheduleTask

func (p *RemoteAccessProxy) UnscheduleTask(
	ctx context.Context,
	clientId string,
	scheduleId string,
) error

type RemoteAccessStub

type RemoteAccessStub struct {
	Impl      IRemoteAccess
	Transport binder.VersionAwareTransport
}

RemoteAccessStub dispatches incoming binder transactions to a typed IRemoteAccess implementation.

func (*RemoteAccessStub) Descriptor

func (s *RemoteAccessStub) Descriptor() string

func (*RemoteAccessStub) OnTransaction

func (s *RemoteAccessStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type RemoteTaskCallbackProxy

type RemoteTaskCallbackProxy struct {
	Remote binder.IBinder
}

func NewRemoteTaskCallbackProxy

func NewRemoteTaskCallbackProxy(
	remote binder.IBinder,
) *RemoteTaskCallbackProxy

func (*RemoteTaskCallbackProxy) AsBinder

func (p *RemoteTaskCallbackProxy) AsBinder() binder.IBinder

func (*RemoteTaskCallbackProxy) OnRemoteTaskRequested

func (p *RemoteTaskCallbackProxy) OnRemoteTaskRequested(
	ctx context.Context,
	clientId string,
	data []byte,
) error

type RemoteTaskCallbackStub

type RemoteTaskCallbackStub struct {
	Impl      IRemoteTaskCallback
	Transport binder.VersionAwareTransport
}

RemoteTaskCallbackStub dispatches incoming binder transactions to a typed IRemoteTaskCallback implementation.

func (*RemoteTaskCallbackStub) Descriptor

func (s *RemoteTaskCallbackStub) Descriptor() string

func (*RemoteTaskCallbackStub) OnTransaction

func (s *RemoteTaskCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type ScheduleInfo

type ScheduleInfo struct {
	ClientId                string
	ScheduleId              string
	TaskType                TaskType
	TaskData                []byte
	Count                   int32
	StartTimeInEpochSeconds int64
	PeriodicInSeconds       int64
}

func (*ScheduleInfo) MarshalParcel

func (s *ScheduleInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ScheduleInfo) UnmarshalParcel

func (s *ScheduleInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type TaskType

type TaskType int32
const (
	TaskTypeCUSTOM          TaskType = 0
	TaskTypeEnterGarageMode TaskType = 1
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL