service

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionICameraServiceAddListener                = binder.FirstCallTransaction + 0
	TransactionICameraServiceConnectDevice              = binder.FirstCallTransaction + 1
	TransactionICameraServiceGetCameraCharacteristics   = binder.FirstCallTransaction + 2
	TransactionICameraServiceGetCameraVendorTagSections = binder.FirstCallTransaction + 3
	TransactionICameraServiceRemoveListener             = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodICameraServiceAddListener                = "addListener"
	MethodICameraServiceConnectDevice              = "connectDevice"
	MethodICameraServiceGetCameraCharacteristics   = "getCameraCharacteristics"
	MethodICameraServiceGetCameraVendorTagSections = "getCameraVendorTagSections"
	MethodICameraServiceRemoveListener             = "removeListener"
)
View Source
const (
	TransactionICameraServiceListenerOnPhysicalCameraStatusChanged = binder.FirstCallTransaction + 0
	TransactionICameraServiceListenerOnStatusChanged               = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodICameraServiceListenerOnPhysicalCameraStatusChanged = "onPhysicalCameraStatusChanged"
	MethodICameraServiceListenerOnStatusChanged               = "onStatusChanged"
)
View Source
const DescriptorICameraService = "android.frameworks.cameraservice.service.ICameraService"
View Source
const DescriptorICameraServiceListener = "android.frameworks.cameraservice.service.ICameraServiceListener"

Variables

This section is empty.

Functions

This section is empty.

Types

type CameraDeviceStatus

type CameraDeviceStatus int32
const (
	CameraDeviceStatusStatusNotAvailable CameraDeviceStatus = -2
	CameraDeviceStatusStatusUnknown      CameraDeviceStatus = -1
	CameraDeviceStatusStatusNotPresent   CameraDeviceStatus = 0
	CameraDeviceStatusStatusPresent      CameraDeviceStatus = 1
	CameraDeviceStatusStatusEnumerating  CameraDeviceStatus = 2
)

type CameraServiceListenerProxy

type CameraServiceListenerProxy struct {
	Remote binder.IBinder
}

func NewCameraServiceListenerProxy

func NewCameraServiceListenerProxy(
	remote binder.IBinder,
) *CameraServiceListenerProxy

func (*CameraServiceListenerProxy) AsBinder

func (*CameraServiceListenerProxy) OnPhysicalCameraStatusChanged

func (p *CameraServiceListenerProxy) OnPhysicalCameraStatusChanged(
	ctx context.Context,
	status CameraDeviceStatus,
	cameraId string,
	physicalCameraId string,
) error

func (*CameraServiceListenerProxy) OnStatusChanged

func (p *CameraServiceListenerProxy) OnStatusChanged(
	ctx context.Context,
	status CameraDeviceStatus,
	cameraId string,
) error

type CameraServiceListenerStub

type CameraServiceListenerStub struct {
	Impl      ICameraServiceListener
	Transport binder.VersionAwareTransport
}

CameraServiceListenerStub dispatches incoming binder transactions to a typed ICameraServiceListener implementation.

func (*CameraServiceListenerStub) Descriptor

func (s *CameraServiceListenerStub) Descriptor() string

func (*CameraServiceListenerStub) OnTransaction

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

type CameraServiceProxy

type CameraServiceProxy struct {
	Remote binder.IBinder
}

func NewCameraServiceProxy

func NewCameraServiceProxy(
	remote binder.IBinder,
) *CameraServiceProxy

func (*CameraServiceProxy) AddListener

func (p *CameraServiceProxy) AddListener(
	ctx context.Context,
	listener ICameraServiceListener,
) ([]CameraStatusAndId, error)

func (*CameraServiceProxy) AsBinder

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

func (*CameraServiceProxy) ConnectDevice

func (p *CameraServiceProxy) ConnectDevice(
	ctx context.Context,
	callback device.ICameraDeviceCallback,
	cameraId string,
) (device.ICameraDeviceUser, error)

func (*CameraServiceProxy) GetCameraCharacteristics

func (p *CameraServiceProxy) GetCameraCharacteristics(
	ctx context.Context,
	cameraId string,
) (device.CameraMetadata, error)

func (*CameraServiceProxy) GetCameraVendorTagSections

func (p *CameraServiceProxy) GetCameraVendorTagSections(
	ctx context.Context,
) ([]common.ProviderIdAndVendorTagSections, error)

func (*CameraServiceProxy) RemoveListener

func (p *CameraServiceProxy) RemoveListener(
	ctx context.Context,
	listener ICameraServiceListener,
) error

type CameraServiceStub

type CameraServiceStub struct {
	Impl      ICameraService
	Transport binder.VersionAwareTransport
}

CameraServiceStub dispatches incoming binder transactions to a typed ICameraService implementation.

func (*CameraServiceStub) Descriptor

func (s *CameraServiceStub) Descriptor() string

func (*CameraServiceStub) OnTransaction

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

type CameraStatusAndId

type CameraStatusAndId struct {
	DeviceStatus             CameraDeviceStatus
	CameraId                 string
	UnavailPhysicalCameraIds []string
}

func (*CameraStatusAndId) MarshalParcel

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

func (*CameraStatusAndId) UnmarshalParcel

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

type ICameraService

type ICameraService interface {
	AsBinder() binder.IBinder
	AddListener(ctx context.Context, listener ICameraServiceListener) ([]CameraStatusAndId, error)
	ConnectDevice(ctx context.Context, callback device.ICameraDeviceCallback, cameraId string) (device.ICameraDeviceUser, error)
	GetCameraCharacteristics(ctx context.Context, cameraId string) (device.CameraMetadata, error)
	GetCameraVendorTagSections(ctx context.Context) ([]common.ProviderIdAndVendorTagSections, error)
	RemoveListener(ctx context.Context, listener ICameraServiceListener) error
}

func NewCameraServiceStub

func NewCameraServiceStub(
	impl ICameraServiceServer,
) ICameraService

NewCameraServiceStub creates a server-side ICameraService wrapping the given server implementation. The returned value satisfies ICameraService 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 ICameraServiceListener

type ICameraServiceListener interface {
	AsBinder() binder.IBinder
	OnPhysicalCameraStatusChanged(ctx context.Context, status CameraDeviceStatus, cameraId string, physicalCameraId string) error
	OnStatusChanged(ctx context.Context, status CameraDeviceStatus, cameraId string) error
}

func NewCameraServiceListenerStub

func NewCameraServiceListenerStub(
	impl ICameraServiceListenerServer,
) ICameraServiceListener

NewCameraServiceListenerStub creates a server-side ICameraServiceListener wrapping the given server implementation. The returned value satisfies ICameraServiceListener 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 ICameraServiceListenerServer

type ICameraServiceListenerServer interface {
	OnPhysicalCameraStatusChanged(ctx context.Context, status CameraDeviceStatus, cameraId string, physicalCameraId string) error
	OnStatusChanged(ctx context.Context, status CameraDeviceStatus, cameraId string) error
}

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

type ICameraServiceServer

type ICameraServiceServer interface {
	AddListener(ctx context.Context, listener ICameraServiceListener) ([]CameraStatusAndId, error)
	ConnectDevice(ctx context.Context, callback device.ICameraDeviceCallback, cameraId string) (device.ICameraDeviceUser, error)
	GetCameraCharacteristics(ctx context.Context, cameraId string) (device.CameraMetadata, error)
	GetCameraVendorTagSections(ctx context.Context) ([]common.ProviderIdAndVendorTagSections, error)
	RemoveListener(ctx context.Context, listener ICameraServiceListener) error
}

ICameraServiceServer is the server-side interface that user implementations provide to NewCameraServiceStub. 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