media

package
v0.0.6 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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIMediaBrowserServiceConnect                      = binder.FirstCallTransaction + 0
	TransactionIMediaBrowserServiceDisconnect                   = binder.FirstCallTransaction + 1
	TransactionIMediaBrowserServiceAddSubscriptionDeprecated    = binder.FirstCallTransaction + 2
	TransactionIMediaBrowserServiceRemoveSubscriptionDeprecated = binder.FirstCallTransaction + 3
	TransactionIMediaBrowserServiceGetMediaItem                 = binder.FirstCallTransaction + 4
	TransactionIMediaBrowserServiceAddSubscription              = binder.FirstCallTransaction + 5
	TransactionIMediaBrowserServiceRemoveSubscription           = binder.FirstCallTransaction + 6
)
View Source
const (
	MethodIMediaBrowserServiceConnect                      = "connect"
	MethodIMediaBrowserServiceDisconnect                   = "disconnect"
	MethodIMediaBrowserServiceAddSubscriptionDeprecated    = "addSubscriptionDeprecated"
	MethodIMediaBrowserServiceRemoveSubscriptionDeprecated = "removeSubscriptionDeprecated"
	MethodIMediaBrowserServiceGetMediaItem                 = "getMediaItem"
	MethodIMediaBrowserServiceAddSubscription              = "addSubscription"
	MethodIMediaBrowserServiceRemoveSubscription           = "removeSubscription"
)
View Source
const (
	TransactionIMediaBrowserServiceCallbacksOnConnect       = binder.FirstCallTransaction + 0
	TransactionIMediaBrowserServiceCallbacksOnConnectFailed = binder.FirstCallTransaction + 1
	TransactionIMediaBrowserServiceCallbacksOnLoadChildren  = binder.FirstCallTransaction + 2
	TransactionIMediaBrowserServiceCallbacksOnDisconnect    = binder.FirstCallTransaction + 3
)
View Source
const (
	MethodIMediaBrowserServiceCallbacksOnConnect       = "onConnect"
	MethodIMediaBrowserServiceCallbacksOnConnectFailed = "onConnectFailed"
	MethodIMediaBrowserServiceCallbacksOnLoadChildren  = "onLoadChildren"
	MethodIMediaBrowserServiceCallbacksOnDisconnect    = "onDisconnect"
)
View Source
const DescriptorIMediaBrowserService = "android.service.media.IMediaBrowserService"
View Source
const DescriptorIMediaBrowserServiceCallbacks = "android.service.media.IMediaBrowserServiceCallbacks"

Variables

This section is empty.

Functions

This section is empty.

Types

type IMediaBrowserService

type IMediaBrowserService interface {
	AsBinder() binder.IBinder
	Connect(ctx context.Context, pkg string, rootHints os.Bundle, callbacks IMediaBrowserServiceCallbacks) error
	Disconnect(ctx context.Context, callbacks IMediaBrowserServiceCallbacks) error
	AddSubscriptionDeprecated(ctx context.Context, uri string, callbacks IMediaBrowserServiceCallbacks) error
	RemoveSubscriptionDeprecated(ctx context.Context, uri string, callbacks IMediaBrowserServiceCallbacks) error
	GetMediaItem(ctx context.Context, uri string, cb os.ResultReceiver, callbacks IMediaBrowserServiceCallbacks) error
	AddSubscription(ctx context.Context, uri string, token binder.IBinder, options os.Bundle, callbacks IMediaBrowserServiceCallbacks) error
	RemoveSubscription(ctx context.Context, uri string, token binder.IBinder, callbacks IMediaBrowserServiceCallbacks) error
}

func NewMediaBrowserServiceStub

func NewMediaBrowserServiceStub(
	impl IMediaBrowserServiceServer,
) IMediaBrowserService

NewMediaBrowserServiceStub creates a server-side IMediaBrowserService wrapping the given server implementation. The returned value satisfies IMediaBrowserService 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 IMediaBrowserServiceCallbacks

type IMediaBrowserServiceCallbacks interface {
	AsBinder() binder.IBinder
	OnConnect(ctx context.Context, root string, session mediaSession.MediaSessionToken, extras os.Bundle) error
	OnConnectFailed(ctx context.Context) error
	OnLoadChildren(ctx context.Context, mediaId string, list pm.ParceledListSlice, options os.Bundle) error
	OnDisconnect(ctx context.Context) error
}

func NewMediaBrowserServiceCallbacksStub

func NewMediaBrowserServiceCallbacksStub(
	impl IMediaBrowserServiceCallbacksServer,
) IMediaBrowserServiceCallbacks

NewMediaBrowserServiceCallbacksStub creates a server-side IMediaBrowserServiceCallbacks wrapping the given server implementation. The returned value satisfies IMediaBrowserServiceCallbacks 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 IMediaBrowserServiceCallbacksServer

type IMediaBrowserServiceCallbacksServer interface {
	OnConnect(ctx context.Context, root string, session mediaSession.MediaSessionToken, extras os.Bundle) error
	OnConnectFailed(ctx context.Context) error
	OnLoadChildren(ctx context.Context, mediaId string, list pm.ParceledListSlice, options os.Bundle) error
	OnDisconnect(ctx context.Context) error
}

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

type IMediaBrowserServiceServer

type IMediaBrowserServiceServer interface {
	Connect(ctx context.Context, pkg string, rootHints os.Bundle, callbacks IMediaBrowserServiceCallbacks) error
	Disconnect(ctx context.Context, callbacks IMediaBrowserServiceCallbacks) error
	AddSubscriptionDeprecated(ctx context.Context, uri string, callbacks IMediaBrowserServiceCallbacks) error
	RemoveSubscriptionDeprecated(ctx context.Context, uri string, callbacks IMediaBrowserServiceCallbacks) error
	GetMediaItem(ctx context.Context, uri string, cb os.ResultReceiver, callbacks IMediaBrowserServiceCallbacks) error
	AddSubscription(ctx context.Context, uri string, token binder.IBinder, options os.Bundle, callbacks IMediaBrowserServiceCallbacks) error
	RemoveSubscription(ctx context.Context, uri string, token binder.IBinder, callbacks IMediaBrowserServiceCallbacks) error
}

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

type MediaBrowserServiceCallbacksProxy

type MediaBrowserServiceCallbacksProxy struct {
	Remote binder.IBinder
}

func NewMediaBrowserServiceCallbacksProxy

func NewMediaBrowserServiceCallbacksProxy(
	remote binder.IBinder,
) *MediaBrowserServiceCallbacksProxy

func (*MediaBrowserServiceCallbacksProxy) AsBinder

func (*MediaBrowserServiceCallbacksProxy) OnConnect

func (*MediaBrowserServiceCallbacksProxy) OnConnectFailed

func (p *MediaBrowserServiceCallbacksProxy) OnConnectFailed(
	ctx context.Context,
) error

func (*MediaBrowserServiceCallbacksProxy) OnDisconnect

func (p *MediaBrowserServiceCallbacksProxy) OnDisconnect(
	ctx context.Context,
) error

func (*MediaBrowserServiceCallbacksProxy) OnLoadChildren

func (p *MediaBrowserServiceCallbacksProxy) OnLoadChildren(
	ctx context.Context,
	mediaId string,
	list pm.ParceledListSlice,
	options os.Bundle,
) error

type MediaBrowserServiceCallbacksStub

type MediaBrowserServiceCallbacksStub struct {
	Impl      IMediaBrowserServiceCallbacks
	Transport binder.VersionAwareTransport
}

MediaBrowserServiceCallbacksStub dispatches incoming binder transactions to a typed IMediaBrowserServiceCallbacks implementation.

func (*MediaBrowserServiceCallbacksStub) Descriptor

func (s *MediaBrowserServiceCallbacksStub) Descriptor() string

func (*MediaBrowserServiceCallbacksStub) OnTransaction

type MediaBrowserServiceProxy

type MediaBrowserServiceProxy struct {
	Remote binder.IBinder
}

func NewMediaBrowserServiceProxy

func NewMediaBrowserServiceProxy(
	remote binder.IBinder,
) *MediaBrowserServiceProxy

func (*MediaBrowserServiceProxy) AddSubscription

func (p *MediaBrowserServiceProxy) AddSubscription(
	ctx context.Context,
	uri string,
	token binder.IBinder,
	options os.Bundle,
	callbacks IMediaBrowserServiceCallbacks,
) error

func (*MediaBrowserServiceProxy) AddSubscriptionDeprecated

func (p *MediaBrowserServiceProxy) AddSubscriptionDeprecated(
	ctx context.Context,
	uri string,
	callbacks IMediaBrowserServiceCallbacks,
) error

func (*MediaBrowserServiceProxy) AsBinder

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

func (*MediaBrowserServiceProxy) Connect

func (p *MediaBrowserServiceProxy) Connect(
	ctx context.Context,
	pkg string,
	rootHints os.Bundle,
	callbacks IMediaBrowserServiceCallbacks,
) error

func (*MediaBrowserServiceProxy) Disconnect

func (*MediaBrowserServiceProxy) GetMediaItem

func (*MediaBrowserServiceProxy) RemoveSubscription

func (p *MediaBrowserServiceProxy) RemoveSubscription(
	ctx context.Context,
	uri string,
	token binder.IBinder,
	callbacks IMediaBrowserServiceCallbacks,
) error

func (*MediaBrowserServiceProxy) RemoveSubscriptionDeprecated

func (p *MediaBrowserServiceProxy) RemoveSubscriptionDeprecated(
	ctx context.Context,
	uri string,
	callbacks IMediaBrowserServiceCallbacks,
) error

type MediaBrowserServiceStub

type MediaBrowserServiceStub struct {
	Impl      IMediaBrowserService
	Transport binder.VersionAwareTransport
}

MediaBrowserServiceStub dispatches incoming binder transactions to a typed IMediaBrowserService implementation.

func (*MediaBrowserServiceStub) Descriptor

func (s *MediaBrowserServiceStub) Descriptor() string

func (*MediaBrowserServiceStub) OnTransaction

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

Jump to

Keyboard shortcuts

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