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

onemedia

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

Documentation

Index

Constants

View Source
const (
	TransactionIPlayerServiceGetSessionToken    = binder.FirstCallTransaction + 0
	TransactionIPlayerServiceRegisterCallback   = binder.FirstCallTransaction + 1
	TransactionIPlayerServiceUnregisterCallback = binder.FirstCallTransaction + 2
	TransactionIPlayerServiceSendRequest        = binder.FirstCallTransaction + 3
	TransactionIPlayerServiceSetIcon            = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIPlayerServiceGetSessionToken    = "getSessionToken"
	MethodIPlayerServiceRegisterCallback   = "registerCallback"
	MethodIPlayerServiceUnregisterCallback = "unregisterCallback"
	MethodIPlayerServiceSendRequest        = "sendRequest"
	MethodIPlayerServiceSetIcon            = "setIcon"
)
View Source
const DescriptorIPlayerCallback = "com.android.onemedia.IPlayerCallback"
View Source
const DescriptorIPlayerService = "com.android.onemedia.IPlayerService"
View Source
const (
	MethodIPlayerCallbackOnSessionChanged = "onSessionChanged"
)
View Source
const (
	TransactionIPlayerCallbackOnSessionChanged = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPlayerCallback

type IPlayerCallback interface {
	AsBinder() binder.IBinder
	OnSessionChanged(ctx context.Context, session mediaSession.MediaSessionToken) error
}

func NewPlayerCallbackStub

func NewPlayerCallbackStub(
	impl IPlayerCallbackServer,
) IPlayerCallback

NewPlayerCallbackStub creates a server-side IPlayerCallback wrapping the given server implementation. The returned value satisfies IPlayerCallback 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 IPlayerCallbackServer

type IPlayerCallbackServer interface {
	OnSessionChanged(ctx context.Context, session mediaSession.MediaSessionToken) error
}

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

type IPlayerService

type IPlayerService interface {
	AsBinder() binder.IBinder
	GetSessionToken(ctx context.Context) (session.MediaSessionToken, error)
	RegisterCallback(ctx context.Context, cb IPlayerCallback) error
	UnregisterCallback(ctx context.Context, cb IPlayerCallback) error
	SendRequest(ctx context.Context, action string, params os.Bundle, cb playback.IRequestCallback) error
	SetIcon(ctx context.Context, icon graphics.Bitmap) error
}

func NewPlayerServiceStub

func NewPlayerServiceStub(
	impl IPlayerServiceServer,
) IPlayerService

NewPlayerServiceStub creates a server-side IPlayerService wrapping the given server implementation. The returned value satisfies IPlayerService 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 IPlayerServiceServer

type IPlayerServiceServer interface {
	GetSessionToken(ctx context.Context) (session.MediaSessionToken, error)
	RegisterCallback(ctx context.Context, cb IPlayerCallback) error
	UnregisterCallback(ctx context.Context, cb IPlayerCallback) error
	SendRequest(ctx context.Context, action string, params os.Bundle, cb playback.IRequestCallback) error
	SetIcon(ctx context.Context, icon graphics.Bitmap) error
}

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

type PlayerCallbackProxy

type PlayerCallbackProxy struct {
	Remote binder.IBinder
}

func NewPlayerCallbackProxy

func NewPlayerCallbackProxy(
	remote binder.IBinder,
) *PlayerCallbackProxy

func (*PlayerCallbackProxy) AsBinder

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

func (*PlayerCallbackProxy) OnSessionChanged

func (p *PlayerCallbackProxy) OnSessionChanged(
	ctx context.Context,
	session mediaSession.MediaSessionToken,
) error

type PlayerCallbackStub

type PlayerCallbackStub struct {
	Impl      IPlayerCallback
	Transport binder.VersionAwareTransport
}

PlayerCallbackStub dispatches incoming binder transactions to a typed IPlayerCallback implementation.

func (*PlayerCallbackStub) Descriptor

func (s *PlayerCallbackStub) Descriptor() string

func (*PlayerCallbackStub) OnTransaction

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

type PlayerServiceProxy

type PlayerServiceProxy struct {
	Remote binder.IBinder
}

func NewPlayerServiceProxy

func NewPlayerServiceProxy(
	remote binder.IBinder,
) *PlayerServiceProxy

func (*PlayerServiceProxy) AsBinder

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

func (*PlayerServiceProxy) GetSessionToken

func (p *PlayerServiceProxy) GetSessionToken(
	ctx context.Context,
) (session.MediaSessionToken, error)

func (*PlayerServiceProxy) RegisterCallback

func (p *PlayerServiceProxy) RegisterCallback(
	ctx context.Context,
	cb IPlayerCallback,
) error

func (*PlayerServiceProxy) SendRequest

func (p *PlayerServiceProxy) SendRequest(
	ctx context.Context,
	action string,
	params os.Bundle,
	cb playback.IRequestCallback,
) error

func (*PlayerServiceProxy) SetIcon

func (p *PlayerServiceProxy) SetIcon(
	ctx context.Context,
	icon graphics.Bitmap,
) error

func (*PlayerServiceProxy) UnregisterCallback

func (p *PlayerServiceProxy) UnregisterCallback(
	ctx context.Context,
	cb IPlayerCallback,
) error

type PlayerServiceStub

type PlayerServiceStub struct {
	Impl      IPlayerService
	Transport binder.VersionAwareTransport
}

PlayerServiceStub dispatches incoming binder transactions to a typed IPlayerService implementation.

func (*PlayerServiceStub) Descriptor

func (s *PlayerServiceStub) Descriptor() string

func (*PlayerServiceStub) OnTransaction

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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