Documentation
¶
Index ¶
- Constants
- type AidlCasPluginDescriptor
- type CasListenerProxy
- func (p *CasListenerProxy) AsBinder() binder.IBinder
- func (p *CasListenerProxy) OnEvent(ctx context.Context, event int32, arg int32, data []byte) error
- func (p *CasListenerProxy) OnSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, data []byte) error
- func (p *CasListenerProxy) OnStatusUpdate(ctx context.Context, event StatusEvent, number int32) error
- type CasListenerStub
- type CasProxy
- func (p *CasProxy) AsBinder() binder.IBinder
- func (p *CasProxy) CloseSession(ctx context.Context, sessionId []byte) error
- func (p *CasProxy) OpenSession(ctx context.Context, intent SessionIntent, mode ScramblingMode) ([]byte, error)
- func (p *CasProxy) OpenSessionDefault(ctx context.Context) ([]byte, error)
- func (p *CasProxy) ProcessEcm(ctx context.Context, sessionId []byte, ecm []byte) error
- func (p *CasProxy) ProcessEmm(ctx context.Context, emm []byte) error
- func (p *CasProxy) Provision(ctx context.Context, provisionString string) error
- func (p *CasProxy) RefreshEntitlements(ctx context.Context, refreshType int32, refreshData []byte) error
- func (p *CasProxy) Release(ctx context.Context) error
- func (p *CasProxy) SendEvent(ctx context.Context, event int32, arg int32, eventData []byte) error
- func (p *CasProxy) SendSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, ...) error
- func (p *CasProxy) SetPrivateData(ctx context.Context, pvtData []byte) error
- func (p *CasProxy) SetSessionPrivateData(ctx context.Context, sessionId []byte, pvtData []byte) error
- type CasStub
- type DescramblerProxy
- func (p *DescramblerProxy) AsBinder() binder.IBinder
- func (p *DescramblerProxy) Descramble(ctx context.Context, scramblingControl ScramblingControl, ...) (int32, error)
- func (p *DescramblerProxy) Release(ctx context.Context) error
- func (p *DescramblerProxy) RequiresSecureDecoderComponent(ctx context.Context, mime string) (bool, error)
- func (p *DescramblerProxy) SetMediaCasSession(ctx context.Context, sessionId []byte) error
- type DescramblerStub
- type DestinationBuffer
- func (u *DestinationBuffer) GetNonsecureMemory() (SharedBuffer, bool)
- func (u *DestinationBuffer) GetSecureMemory() (common.NativeHandle, bool)
- func (u *DestinationBuffer) MarshalParcel(p *parcel.Parcel) error
- func (u *DestinationBuffer) SetNonsecureMemory(v SharedBuffer)
- func (u *DestinationBuffer) SetSecureMemory(v common.NativeHandle)
- func (u *DestinationBuffer) UnmarshalParcel(p *parcel.Parcel) error
- type ICas
- type ICasListener
- type ICasListenerServer
- type ICasServer
- type IDescrambler
- type IDescramblerServer
- type IMediaCasService
- type IMediaCasServiceServer
- type MediaCasServiceProxy
- func (p *MediaCasServiceProxy) AsBinder() binder.IBinder
- func (p *MediaCasServiceProxy) CreateDescrambler(ctx context.Context, CA_system_id int32) (IDescrambler, error)
- func (p *MediaCasServiceProxy) CreatePlugin(ctx context.Context, CA_system_id int32, listener ICasListener) (ICas, error)
- func (p *MediaCasServiceProxy) EnumeratePlugins(ctx context.Context) ([]AidlCasPluginDescriptor, error)
- func (p *MediaCasServiceProxy) IsDescramblerSupported(ctx context.Context, CA_system_id int32) (bool, error)
- func (p *MediaCasServiceProxy) IsSystemIdSupported(ctx context.Context, CA_system_id int32) (bool, error)
- type MediaCasServiceStub
- type ScramblingControl
- type ScramblingMode
- type SessionIntent
- type SharedBuffer
- type Status
- type StatusEvent
- type SubSample
Constants ¶
const ( DestinationBufferTagNonsecureMemory int32 = 0 DestinationBufferTagSecureMemory int32 = 1 )
const ( TransactionICasCloseSession = binder.FirstCallTransaction + 0 TransactionICasOpenSessionDefault = binder.FirstCallTransaction + 1 TransactionICasOpenSession = binder.FirstCallTransaction + 2 TransactionICasProcessEcm = binder.FirstCallTransaction + 3 TransactionICasProcessEmm = binder.FirstCallTransaction + 4 TransactionICasProvision = binder.FirstCallTransaction + 5 TransactionICasRefreshEntitlements = binder.FirstCallTransaction + 6 TransactionICasRelease = binder.FirstCallTransaction + 7 TransactionICasSendEvent = binder.FirstCallTransaction + 8 TransactionICasSendSessionEvent = binder.FirstCallTransaction + 9 TransactionICasSetPrivateData = binder.FirstCallTransaction + 10 TransactionICasSetSessionPrivateData = binder.FirstCallTransaction + 11 )
const ( MethodICasCloseSession = "closeSession" MethodICasOpenSessionDefault = "openSessionDefault" MethodICasOpenSession = "openSession" MethodICasProcessEcm = "processEcm" MethodICasProcessEmm = "processEmm" MethodICasProvision = "provision" MethodICasRefreshEntitlements = "refreshEntitlements" MethodICasRelease = "release" MethodICasSendEvent = "sendEvent" MethodICasSendSessionEvent = "sendSessionEvent" MethodICasSetPrivateData = "setPrivateData" MethodICasSetSessionPrivateData = "setSessionPrivateData" )
const ( TransactionICasListenerOnEvent = binder.FirstCallTransaction + 0 TransactionICasListenerOnSessionEvent = binder.FirstCallTransaction + 1 TransactionICasListenerOnStatusUpdate = binder.FirstCallTransaction + 2 )
const ( MethodICasListenerOnEvent = "onEvent" MethodICasListenerOnSessionEvent = "onSessionEvent" MethodICasListenerOnStatusUpdate = "onStatusUpdate" )
const ( TransactionIDescramblerDescramble = binder.FirstCallTransaction + 0 TransactionIDescramblerRelease = binder.FirstCallTransaction + 1 TransactionIDescramblerRequiresSecureDecoderComponent = binder.FirstCallTransaction + 2 TransactionIDescramblerSetMediaCasSession = binder.FirstCallTransaction + 3 )
const ( MethodIDescramblerDescramble = "descramble" MethodIDescramblerRelease = "release" MethodIDescramblerRequiresSecureDecoderComponent = "requiresSecureDecoderComponent" MethodIDescramblerSetMediaCasSession = "setMediaCasSession" )
const ( TransactionIMediaCasServiceCreateDescrambler = binder.FirstCallTransaction + 0 TransactionIMediaCasServiceCreatePlugin = binder.FirstCallTransaction + 1 TransactionIMediaCasServiceEnumeratePlugins = binder.FirstCallTransaction + 2 TransactionIMediaCasServiceIsDescramblerSupported = binder.FirstCallTransaction + 3 TransactionIMediaCasServiceIsSystemIdSupported = binder.FirstCallTransaction + 4 )
const ( MethodIMediaCasServiceCreateDescrambler = "createDescrambler" MethodIMediaCasServiceCreatePlugin = "createPlugin" MethodIMediaCasServiceEnumeratePlugins = "enumeratePlugins" MethodIMediaCasServiceIsDescramblerSupported = "isDescramblerSupported" MethodIMediaCasServiceIsSystemIdSupported = "isSystemIdSupported" )
const ( StatusOK int32 = 0 StatusErrorCasNoLicense int32 = 1 StatusErrorCasLicenseExpired int32 = 2 StatusErrorCasSessionNotOpened int32 = 3 StatusErrorCasCannotHandle int32 = 4 StatusErrorCasInvalidState int32 = 5 StatusBadValue int32 = 6 StatusErrorCasNotProvisioned int32 = 7 StatusErrorCasResourceBusy int32 = 8 StatusErrorCasInsufficientOutputProtection int32 = 9 StatusErrorCasTamperDetected int32 = 10 StatusErrorCasDeviceRevoked int32 = 11 StatusErrorCasDecryptUnitNotInitialized int32 = 12 StatusErrorCasDecrypt int32 = 13 StatusErrorCasUnknown int32 = 14 StatusErrorCasNeedActivation int32 = 15 StatusErrorCasNeedPairing int32 = 16 StatusErrorCasNoCard int32 = 17 StatusErrorCasCardMute int32 = 18 StatusErrorCasCardInvalid int32 = 19 StatusErrorCasBlackout int32 = 20 StatusErrorCasRebooting int32 = 21 )
const DescriptorICas = "android.hardware.cas.ICas"
const DescriptorICasListener = "android.hardware.cas.ICasListener"
const DescriptorIDescrambler = "android.hardware.cas.IDescrambler"
const DescriptorIMediaCasService = "android.hardware.cas.IMediaCasService"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AidlCasPluginDescriptor ¶
func (*AidlCasPluginDescriptor) MarshalParcel ¶
func (s *AidlCasPluginDescriptor) MarshalParcel( p *parcel.Parcel, ) error
func (*AidlCasPluginDescriptor) UnmarshalParcel ¶
func (s *AidlCasPluginDescriptor) UnmarshalParcel( p *parcel.Parcel, ) error
type CasListenerProxy ¶
func NewCasListenerProxy ¶
func NewCasListenerProxy( remote binder.IBinder, ) *CasListenerProxy
func (*CasListenerProxy) AsBinder ¶
func (p *CasListenerProxy) AsBinder() binder.IBinder
func (*CasListenerProxy) OnSessionEvent ¶
func (*CasListenerProxy) OnStatusUpdate ¶
func (p *CasListenerProxy) OnStatusUpdate( ctx context.Context, event StatusEvent, number int32, ) error
type CasListenerStub ¶
type CasListenerStub struct {
Impl ICasListener
Transport binder.VersionAwareTransport
}
CasListenerStub dispatches incoming binder transactions to a typed ICasListener implementation.
func (*CasListenerStub) Descriptor ¶
func (s *CasListenerStub) Descriptor() string
func (*CasListenerStub) OnTransaction ¶
func (s *CasListenerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type CasProxy ¶
func NewCasProxy ¶
func (*CasProxy) CloseSession ¶
func (*CasProxy) OpenSession ¶
func (p *CasProxy) OpenSession( ctx context.Context, intent SessionIntent, mode ScramblingMode, ) ([]byte, error)
func (*CasProxy) OpenSessionDefault ¶
func (*CasProxy) ProcessEcm ¶
func (*CasProxy) ProcessEmm ¶
func (*CasProxy) RefreshEntitlements ¶
func (*CasProxy) SendSessionEvent ¶
func (*CasProxy) SetPrivateData ¶
type CasStub ¶
type CasStub struct {
Impl ICas
Transport binder.VersionAwareTransport
}
CasStub dispatches incoming binder transactions to a typed ICas implementation.
func (*CasStub) Descriptor ¶
type DescramblerProxy ¶
func NewDescramblerProxy ¶
func NewDescramblerProxy( remote binder.IBinder, ) *DescramblerProxy
func (*DescramblerProxy) AsBinder ¶
func (p *DescramblerProxy) AsBinder() binder.IBinder
func (*DescramblerProxy) Descramble ¶
func (p *DescramblerProxy) Descramble( ctx context.Context, scramblingControl ScramblingControl, subSamples []SubSample, srcBuffer SharedBuffer, srcOffset int64, dstBuffer DestinationBuffer, dstOffset int64, ) (int32, error)
func (*DescramblerProxy) RequiresSecureDecoderComponent ¶
func (*DescramblerProxy) SetMediaCasSession ¶
func (p *DescramblerProxy) SetMediaCasSession( ctx context.Context, sessionId []byte, ) error
type DescramblerStub ¶
type DescramblerStub struct {
Impl IDescrambler
Transport binder.VersionAwareTransport
}
DescramblerStub dispatches incoming binder transactions to a typed IDescrambler implementation.
func (*DescramblerStub) Descriptor ¶
func (s *DescramblerStub) Descriptor() string
func (*DescramblerStub) OnTransaction ¶
func (s *DescramblerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type DestinationBuffer ¶
type DestinationBuffer struct {
Tag int32
NonsecureMemory SharedBuffer
SecureMemory common.NativeHandle
}
func (*DestinationBuffer) GetNonsecureMemory ¶
func (u *DestinationBuffer) GetNonsecureMemory() (SharedBuffer, bool)
func (*DestinationBuffer) GetSecureMemory ¶
func (u *DestinationBuffer) GetSecureMemory() (common.NativeHandle, bool)
func (*DestinationBuffer) MarshalParcel ¶
func (u *DestinationBuffer) MarshalParcel( p *parcel.Parcel, ) error
func (*DestinationBuffer) SetNonsecureMemory ¶
func (u *DestinationBuffer) SetNonsecureMemory( v SharedBuffer, )
func (*DestinationBuffer) SetSecureMemory ¶
func (u *DestinationBuffer) SetSecureMemory( v common.NativeHandle, )
func (*DestinationBuffer) UnmarshalParcel ¶
func (u *DestinationBuffer) UnmarshalParcel( p *parcel.Parcel, ) error
type ICas ¶
type ICas interface {
AsBinder() binder.IBinder
CloseSession(ctx context.Context, sessionId []byte) error
OpenSessionDefault(ctx context.Context) ([]byte, error)
OpenSession(ctx context.Context, intent SessionIntent, mode ScramblingMode) ([]byte, error)
ProcessEcm(ctx context.Context, sessionId []byte, ecm []byte) error
ProcessEmm(ctx context.Context, emm []byte) error
Provision(ctx context.Context, provisionString string) error
RefreshEntitlements(ctx context.Context, refreshType int32, refreshData []byte) error
Release(ctx context.Context) error
SendEvent(ctx context.Context, event int32, arg int32, eventData []byte) error
SendSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, eventData []byte) error
SetPrivateData(ctx context.Context, pvtData []byte) error
SetSessionPrivateData(ctx context.Context, sessionId []byte, pvtData []byte) error
}
func NewCasStub ¶
func NewCasStub( impl ICasServer, ) ICas
NewCasStub creates a server-side ICas wrapping the given server implementation. The returned value satisfies ICas 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 ICasListener ¶
type ICasListener interface {
AsBinder() binder.IBinder
OnEvent(ctx context.Context, event int32, arg int32, data []byte) error
OnSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, data []byte) error
OnStatusUpdate(ctx context.Context, event StatusEvent, number int32) error
}
func NewCasListenerStub ¶
func NewCasListenerStub( impl ICasListenerServer, ) ICasListener
NewCasListenerStub creates a server-side ICasListener wrapping the given server implementation. The returned value satisfies ICasListener 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 ICasListenerServer ¶
type ICasListenerServer interface {
OnEvent(ctx context.Context, event int32, arg int32, data []byte) error
OnSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, data []byte) error
OnStatusUpdate(ctx context.Context, event StatusEvent, number int32) error
}
ICasListenerServer is the server-side interface that user implementations provide to NewCasListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ICasServer ¶
type ICasServer interface {
CloseSession(ctx context.Context, sessionId []byte) error
OpenSessionDefault(ctx context.Context) ([]byte, error)
OpenSession(ctx context.Context, intent SessionIntent, mode ScramblingMode) ([]byte, error)
ProcessEcm(ctx context.Context, sessionId []byte, ecm []byte) error
ProcessEmm(ctx context.Context, emm []byte) error
Provision(ctx context.Context, provisionString string) error
RefreshEntitlements(ctx context.Context, refreshType int32, refreshData []byte) error
Release(ctx context.Context) error
SendEvent(ctx context.Context, event int32, arg int32, eventData []byte) error
SendSessionEvent(ctx context.Context, sessionId []byte, event int32, arg int32, eventData []byte) error
SetPrivateData(ctx context.Context, pvtData []byte) error
SetSessionPrivateData(ctx context.Context, sessionId []byte, pvtData []byte) error
}
ICasServer is the server-side interface that user implementations provide to NewCasStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IDescrambler ¶
type IDescrambler interface {
AsBinder() binder.IBinder
Descramble(ctx context.Context, scramblingControl ScramblingControl, subSamples []SubSample, srcBuffer SharedBuffer, srcOffset int64, dstBuffer DestinationBuffer, dstOffset int64) (int32, error)
Release(ctx context.Context) error
RequiresSecureDecoderComponent(ctx context.Context, mime string) (bool, error)
SetMediaCasSession(ctx context.Context, sessionId []byte) error
}
func NewDescramblerStub ¶
func NewDescramblerStub( impl IDescramblerServer, ) IDescrambler
NewDescramblerStub creates a server-side IDescrambler wrapping the given server implementation. The returned value satisfies IDescrambler 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 IDescramblerServer ¶
type IDescramblerServer interface {
Descramble(ctx context.Context, scramblingControl ScramblingControl, subSamples []SubSample, srcBuffer SharedBuffer, srcOffset int64, dstBuffer DestinationBuffer, dstOffset int64) (int32, error)
Release(ctx context.Context) error
RequiresSecureDecoderComponent(ctx context.Context, mime string) (bool, error)
SetMediaCasSession(ctx context.Context, sessionId []byte) error
}
IDescramblerServer is the server-side interface that user implementations provide to NewDescramblerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IMediaCasService ¶
type IMediaCasService interface {
AsBinder() binder.IBinder
CreateDescrambler(ctx context.Context, CA_system_id int32) (IDescrambler, error)
CreatePlugin(ctx context.Context, CA_system_id int32, listener ICasListener) (ICas, error)
EnumeratePlugins(ctx context.Context) ([]AidlCasPluginDescriptor, error)
IsDescramblerSupported(ctx context.Context, CA_system_id int32) (bool, error)
IsSystemIdSupported(ctx context.Context, CA_system_id int32) (bool, error)
}
func NewMediaCasServiceStub ¶
func NewMediaCasServiceStub( impl IMediaCasServiceServer, ) IMediaCasService
NewMediaCasServiceStub creates a server-side IMediaCasService wrapping the given server implementation. The returned value satisfies IMediaCasService 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 IMediaCasServiceServer ¶
type IMediaCasServiceServer interface {
CreateDescrambler(ctx context.Context, CA_system_id int32) (IDescrambler, error)
CreatePlugin(ctx context.Context, CA_system_id int32, listener ICasListener) (ICas, error)
EnumeratePlugins(ctx context.Context) ([]AidlCasPluginDescriptor, error)
IsDescramblerSupported(ctx context.Context, CA_system_id int32) (bool, error)
IsSystemIdSupported(ctx context.Context, CA_system_id int32) (bool, error)
}
IMediaCasServiceServer is the server-side interface that user implementations provide to NewMediaCasServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type MediaCasServiceProxy ¶
func NewMediaCasServiceProxy ¶
func NewMediaCasServiceProxy( remote binder.IBinder, ) *MediaCasServiceProxy
func (*MediaCasServiceProxy) AsBinder ¶
func (p *MediaCasServiceProxy) AsBinder() binder.IBinder
func (*MediaCasServiceProxy) CreateDescrambler ¶
func (p *MediaCasServiceProxy) CreateDescrambler( ctx context.Context, CA_system_id int32, ) (IDescrambler, error)
func (*MediaCasServiceProxy) CreatePlugin ¶
func (p *MediaCasServiceProxy) CreatePlugin( ctx context.Context, CA_system_id int32, listener ICasListener, ) (ICas, error)
func (*MediaCasServiceProxy) EnumeratePlugins ¶
func (p *MediaCasServiceProxy) EnumeratePlugins( ctx context.Context, ) ([]AidlCasPluginDescriptor, error)
func (*MediaCasServiceProxy) IsDescramblerSupported ¶
func (*MediaCasServiceProxy) IsSystemIdSupported ¶
type MediaCasServiceStub ¶
type MediaCasServiceStub struct {
Impl IMediaCasService
Transport binder.VersionAwareTransport
}
MediaCasServiceStub dispatches incoming binder transactions to a typed IMediaCasService implementation.
func (*MediaCasServiceStub) Descriptor ¶
func (s *MediaCasServiceStub) Descriptor() string
func (*MediaCasServiceStub) OnTransaction ¶
func (s *MediaCasServiceStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type ScramblingControl ¶
type ScramblingControl int32
const ( ScramblingControlUNSCRAMBLED ScramblingControl = 0 ScramblingControlRESERVED ScramblingControl = 1 ScramblingControlEVENKEY ScramblingControl = 2 ScramblingControlODDKEY ScramblingControl = 3 )
type ScramblingMode ¶
type ScramblingMode int32
const ( ScramblingModeRESERVED ScramblingMode = 0 ScramblingModeDvbCsa1 ScramblingMode = 1 ScramblingModeDvbCsa2 ScramblingMode = 2 ScramblingModeDvbCsa3Standard ScramblingMode = 3 ScramblingModeDvbCsa3Minimal ScramblingMode = 4 ScramblingModeDvbCsa3Enhance ScramblingMode = 5 ScramblingModeDvbCissaV1 ScramblingMode = 6 ScramblingModeDvbIdsa ScramblingMode = 7 ScramblingModeMULTI2 ScramblingMode = 8 ScramblingModeAES128 ScramblingMode = 9 ScramblingModeAesEcb ScramblingMode = 10 ScramblingModeAesScte52 ScramblingMode = 11 ScramblingModeTdesEcb ScramblingMode = 12 ScramblingModeTdesScte52 ScramblingMode = 13 ScramblingModeAesCbc ScramblingMode = 14 )
type SessionIntent ¶
type SessionIntent int32
const ( SessionIntentLIVE SessionIntent = 0 SessionIntentPLAYBACK SessionIntent = 1 SessionIntentRECORD SessionIntent = 2 SessionIntentTIMESHIFT SessionIntent = 3 )
type SharedBuffer ¶
type SharedBuffer struct {
}
func (*SharedBuffer) MarshalParcel ¶
func (s *SharedBuffer) MarshalParcel( p *parcel.Parcel, ) error
func (*SharedBuffer) UnmarshalParcel ¶
func (s *SharedBuffer) UnmarshalParcel( p *parcel.Parcel, ) error
type StatusEvent ¶
type StatusEvent byte
const ( StatusEventPluginPhysicalModuleChanged StatusEvent = 0 StatusEventPluginSessionNumberChanged StatusEvent = 1 )