Help us shape the future of Go! Take the 2026 Go Developer Survey

provider

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionICameraProviderSetCallback                            = binder.FirstCallTransaction + 0
	TransactionICameraProviderGetVendorTags                          = binder.FirstCallTransaction + 1
	TransactionICameraProviderGetCameraIdList                        = binder.FirstCallTransaction + 2
	TransactionICameraProviderGetCameraDeviceInterface               = binder.FirstCallTransaction + 3
	TransactionICameraProviderNotifyDeviceStateChange                = binder.FirstCallTransaction + 4
	TransactionICameraProviderGetConcurrentCameraIds                 = binder.FirstCallTransaction + 5
	TransactionICameraProviderIsConcurrentStreamCombinationSupported = binder.FirstCallTransaction + 6
)
View Source
const (
	MethodICameraProviderSetCallback                            = "setCallback"
	MethodICameraProviderGetVendorTags                          = "getVendorTags"
	MethodICameraProviderGetCameraIdList                        = "getCameraIdList"
	MethodICameraProviderGetCameraDeviceInterface               = "getCameraDeviceInterface"
	MethodICameraProviderNotifyDeviceStateChange                = "notifyDeviceStateChange"
	MethodICameraProviderGetConcurrentCameraIds                 = "getConcurrentCameraIds"
	MethodICameraProviderIsConcurrentStreamCombinationSupported = "isConcurrentStreamCombinationSupported"
)
View Source
const (
	ICameraProviderDeviceStateNormal       int64 = 0
	ICameraProviderDeviceStateBackCovered  int64 = (1 << 0)
	ICameraProviderDeviceStateFrontCovered int64 = (1 << 1)
	ICameraProviderDeviceStateFolded       int64 = (1 << 2)
)
View Source
const (
	TransactionICameraProviderCallbackCameraDeviceStatusChange         = binder.FirstCallTransaction + 0
	TransactionICameraProviderCallbackTorchModeStatusChange            = binder.FirstCallTransaction + 1
	TransactionICameraProviderCallbackPhysicalCameraDeviceStatusChange = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodICameraProviderCallbackCameraDeviceStatusChange         = "cameraDeviceStatusChange"
	MethodICameraProviderCallbackTorchModeStatusChange            = "torchModeStatusChange"
	MethodICameraProviderCallbackPhysicalCameraDeviceStatusChange = "physicalCameraDeviceStatusChange"
)
View Source
const DescriptorICameraProvider = "android.hardware.camera.provider.ICameraProvider"
View Source
const DescriptorICameraProviderCallback = "android.hardware.camera.provider.ICameraProviderCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type CameraIdAndStreamCombination

type CameraIdAndStreamCombination struct {
	CameraId            string
	StreamConfiguration device.StreamConfiguration
}

func (*CameraIdAndStreamCombination) MarshalParcel

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

func (*CameraIdAndStreamCombination) UnmarshalParcel

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

type CameraProviderCallbackProxy

type CameraProviderCallbackProxy struct {
	Remote binder.IBinder
}

func NewCameraProviderCallbackProxy

func NewCameraProviderCallbackProxy(
	remote binder.IBinder,
) *CameraProviderCallbackProxy

func (*CameraProviderCallbackProxy) AsBinder

func (*CameraProviderCallbackProxy) CameraDeviceStatusChange

func (p *CameraProviderCallbackProxy) CameraDeviceStatusChange(
	ctx context.Context,
	cameraDeviceName string,
	newStatus common.CameraDeviceStatus,
) error

func (*CameraProviderCallbackProxy) PhysicalCameraDeviceStatusChange

func (p *CameraProviderCallbackProxy) PhysicalCameraDeviceStatusChange(
	ctx context.Context,
	cameraDeviceName string,
	physicalCameraDeviceName string,
	newStatus common.CameraDeviceStatus,
) error

func (*CameraProviderCallbackProxy) TorchModeStatusChange

func (p *CameraProviderCallbackProxy) TorchModeStatusChange(
	ctx context.Context,
	cameraDeviceName string,
	newStatus common.TorchModeStatus,
) error

type CameraProviderCallbackStub

type CameraProviderCallbackStub struct {
	Impl      ICameraProviderCallback
	Transport binder.VersionAwareTransport
}

CameraProviderCallbackStub dispatches incoming binder transactions to a typed ICameraProviderCallback implementation.

func (*CameraProviderCallbackStub) Descriptor

func (s *CameraProviderCallbackStub) Descriptor() string

func (*CameraProviderCallbackStub) OnTransaction

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

type CameraProviderProxy

type CameraProviderProxy struct {
	Remote binder.IBinder
}

func NewCameraProviderProxy

func NewCameraProviderProxy(
	remote binder.IBinder,
) *CameraProviderProxy

func (*CameraProviderProxy) AsBinder

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

func (*CameraProviderProxy) GetCameraDeviceInterface

func (p *CameraProviderProxy) GetCameraDeviceInterface(
	ctx context.Context,
	cameraDeviceName string,
) (device.ICameraDevice, error)

func (*CameraProviderProxy) GetCameraIdList

func (p *CameraProviderProxy) GetCameraIdList(
	ctx context.Context,
) ([]string, error)

func (*CameraProviderProxy) GetConcurrentCameraIds

func (p *CameraProviderProxy) GetConcurrentCameraIds(
	ctx context.Context,
) ([]ConcurrentCameraIdCombination, error)

func (*CameraProviderProxy) GetVendorTags

func (p *CameraProviderProxy) GetVendorTags(
	ctx context.Context,
) ([]common.VendorTagSection, error)

func (*CameraProviderProxy) IsConcurrentStreamCombinationSupported

func (p *CameraProviderProxy) IsConcurrentStreamCombinationSupported(
	ctx context.Context,
	configs []CameraIdAndStreamCombination,
) (bool, error)

func (*CameraProviderProxy) NotifyDeviceStateChange

func (p *CameraProviderProxy) NotifyDeviceStateChange(
	ctx context.Context,
	deviceState int64,
) error

func (*CameraProviderProxy) SetCallback

func (p *CameraProviderProxy) SetCallback(
	ctx context.Context,
	callback ICameraProviderCallback,
) error

type CameraProviderStub

type CameraProviderStub struct {
	Impl      ICameraProvider
	Transport binder.VersionAwareTransport
}

CameraProviderStub dispatches incoming binder transactions to a typed ICameraProvider implementation.

func (*CameraProviderStub) Descriptor

func (s *CameraProviderStub) Descriptor() string

func (*CameraProviderStub) OnTransaction

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

type ConcurrentCameraIdCombination

type ConcurrentCameraIdCombination struct {
	Combination []string
}

func (*ConcurrentCameraIdCombination) MarshalParcel

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

func (*ConcurrentCameraIdCombination) UnmarshalParcel

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

type ICameraProvider

type ICameraProvider interface {
	AsBinder() binder.IBinder
	SetCallback(ctx context.Context, callback ICameraProviderCallback) error
	GetVendorTags(ctx context.Context) ([]common.VendorTagSection, error)
	GetCameraIdList(ctx context.Context) ([]string, error)
	GetCameraDeviceInterface(ctx context.Context, cameraDeviceName string) (device.ICameraDevice, error)
	NotifyDeviceStateChange(ctx context.Context, deviceState int64) error
	GetConcurrentCameraIds(ctx context.Context) ([]ConcurrentCameraIdCombination, error)
	IsConcurrentStreamCombinationSupported(ctx context.Context, configs []CameraIdAndStreamCombination) (bool, error)
}

func NewCameraProviderStub

func NewCameraProviderStub(
	impl ICameraProviderServer,
) ICameraProvider

NewCameraProviderStub creates a server-side ICameraProvider wrapping the given server implementation. The returned value satisfies ICameraProvider 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 ICameraProviderCallback

type ICameraProviderCallback interface {
	AsBinder() binder.IBinder
	CameraDeviceStatusChange(ctx context.Context, cameraDeviceName string, newStatus common.CameraDeviceStatus) error
	TorchModeStatusChange(ctx context.Context, cameraDeviceName string, newStatus common.TorchModeStatus) error
	PhysicalCameraDeviceStatusChange(ctx context.Context, cameraDeviceName string, physicalCameraDeviceName string, newStatus common.CameraDeviceStatus) error
}

func NewCameraProviderCallbackStub

func NewCameraProviderCallbackStub(
	impl ICameraProviderCallbackServer,
) ICameraProviderCallback

NewCameraProviderCallbackStub creates a server-side ICameraProviderCallback wrapping the given server implementation. The returned value satisfies ICameraProviderCallback 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 ICameraProviderCallbackServer

type ICameraProviderCallbackServer interface {
	CameraDeviceStatusChange(ctx context.Context, cameraDeviceName string, newStatus common.CameraDeviceStatus) error
	TorchModeStatusChange(ctx context.Context, cameraDeviceName string, newStatus common.TorchModeStatus) error
	PhysicalCameraDeviceStatusChange(ctx context.Context, cameraDeviceName string, physicalCameraDeviceName string, newStatus common.CameraDeviceStatus) error
}

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

type ICameraProviderServer

type ICameraProviderServer interface {
	SetCallback(ctx context.Context, callback ICameraProviderCallback) error
	GetVendorTags(ctx context.Context) ([]common.VendorTagSection, error)
	GetCameraIdList(ctx context.Context) ([]string, error)
	GetCameraDeviceInterface(ctx context.Context, cameraDeviceName string) (device.ICameraDevice, error)
	NotifyDeviceStateChange(ctx context.Context, deviceState int64) error
	GetConcurrentCameraIds(ctx context.Context) ([]ConcurrentCameraIdCombination, error)
	IsConcurrentStreamCombinationSupported(ctx context.Context, configs []CameraIdAndStreamCombination) (bool, error)
}

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

Jump to

Keyboard shortcuts

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