Documentation
¶
Index ¶
- Constants
- type ITranslationDirectManager
- type ITranslationDirectManagerServer
- type ITranslationManager
- type ITranslationManagerServer
- type ITranslationServiceCallback
- type ITranslationServiceCallbackServer
- type TranslationCapability
- type TranslationContext
- type TranslationDirectManagerProxy
- func (p *TranslationDirectManagerProxy) AsBinder() binder.IBinder
- func (p *TranslationDirectManagerProxy) OnFinishTranslationSession(ctx context.Context, sessionId int32) error
- func (p *TranslationDirectManagerProxy) OnTranslationRequest(ctx context.Context, request TranslationRequest, sessionId int32, ...) error
- type TranslationDirectManagerStub
- type TranslationManagerProxy
- func GetTranslationManager(ctx context.Context, sm *servicemanager.ServiceManager) (*TranslationManagerProxy, error)
- func GetUiTranslationService(ctx context.Context, sm *servicemanager.ServiceManager) (*TranslationManagerProxy, error)
- func NewTranslationManagerProxy(remote binder.IBinder) *TranslationManagerProxy
- func (p *TranslationManagerProxy) AsBinder() binder.IBinder
- func (p *TranslationManagerProxy) GetServiceSettingsActivity(ctx context.Context, result internalOs.IResultReceiver) error
- func (p *TranslationManagerProxy) OnSessionCreated(ctx context.Context, translationContext TranslationContext, sessionId int32, ...) error
- func (p *TranslationManagerProxy) OnTranslationCapabilitiesRequest(ctx context.Context, sourceFormat int32, destFormat int32, ...) error
- func (p *TranslationManagerProxy) OnTranslationFinished(ctx context.Context, activityDestroyed bool, token binder.IBinder, ...) error
- func (p *TranslationManagerProxy) RegisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
- func (p *TranslationManagerProxy) RegisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
- func (p *TranslationManagerProxy) UnregisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
- func (p *TranslationManagerProxy) UnregisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
- func (p *TranslationManagerProxy) UpdateUiTranslationState(ctx context.Context, state int32, sourceSpec TranslationSpec, ...) error
- type TranslationManagerStub
- type TranslationRequest
- type TranslationRequestValue
- type TranslationResponse
- type TranslationResponseValue
- type TranslationServiceCallbackProxy
- type TranslationServiceCallbackStub
- type TranslationSpec
- type UiTranslationSpec
- type ViewTranslationRequest
- type ViewTranslationResponse
Constants ¶
const ( TransactionITranslationDirectManagerOnTranslationRequest = binder.FirstCallTransaction + 0 TransactionITranslationDirectManagerOnFinishTranslationSession = binder.FirstCallTransaction + 1 )
const ( MethodITranslationDirectManagerOnTranslationRequest = "onTranslationRequest" MethodITranslationDirectManagerOnFinishTranslationSession = "onFinishTranslationSession" )
const ( TransactionITranslationManagerOnTranslationCapabilitiesRequest = binder.FirstCallTransaction + 0 TransactionITranslationManagerRegisterTranslationCapabilityCallback = binder.FirstCallTransaction + 1 TransactionITranslationManagerUnregisterTranslationCapabilityCallback = binder.FirstCallTransaction + 2 TransactionITranslationManagerOnSessionCreated = binder.FirstCallTransaction + 3 TransactionITranslationManagerUpdateUiTranslationState = binder.FirstCallTransaction + 4 TransactionITranslationManagerRegisterUiTranslationStateCallback = binder.FirstCallTransaction + 5 TransactionITranslationManagerUnregisterUiTranslationStateCallback = binder.FirstCallTransaction + 6 TransactionITranslationManagerGetServiceSettingsActivity = binder.FirstCallTransaction + 7 TransactionITranslationManagerOnTranslationFinished = binder.FirstCallTransaction + 8 )
const ( MethodITranslationManagerOnTranslationCapabilitiesRequest = "onTranslationCapabilitiesRequest" MethodITranslationManagerRegisterTranslationCapabilityCallback = "registerTranslationCapabilityCallback" MethodITranslationManagerUnregisterTranslationCapabilityCallback = "unregisterTranslationCapabilityCallback" MethodITranslationManagerOnSessionCreated = "onSessionCreated" MethodITranslationManagerUpdateUiTranslationState = "updateUiTranslationState" MethodITranslationManagerRegisterUiTranslationStateCallback = "registerUiTranslationStateCallback" MethodITranslationManagerUnregisterUiTranslationStateCallback = "unregisterUiTranslationStateCallback" MethodITranslationManagerGetServiceSettingsActivity = "getServiceSettingsActivity" MethodITranslationManagerOnTranslationFinished = "onTranslationFinished" )
const DescriptorITranslationDirectManager = "android.view.translation.ITranslationDirectManager"
const DescriptorITranslationManager = "android.view.translation.ITranslationManager"
const DescriptorITranslationServiceCallback = "android.view.translation.ITranslationServiceCallback"
const (
MethodITranslationServiceCallbackUpdateTranslationCapability = "updateTranslationCapability"
)
const (
TransactionITranslationServiceCallbackUpdateTranslationCapability = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITranslationDirectManager ¶
type ITranslationDirectManager interface {
AsBinder() binder.IBinder
OnTranslationRequest(ctx context.Context, request TranslationRequest, sessionId int32, transport os.ICancellationSignal, callback serviceTranslation.ITranslationCallback) error
OnFinishTranslationSession(ctx context.Context, sessionId int32) error
}
func NewTranslationDirectManagerStub ¶
func NewTranslationDirectManagerStub( impl ITranslationDirectManagerServer, ) ITranslationDirectManager
NewTranslationDirectManagerStub creates a server-side ITranslationDirectManager wrapping the given server implementation. The returned value satisfies ITranslationDirectManager 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 ITranslationDirectManagerServer ¶
type ITranslationDirectManagerServer interface {
OnTranslationRequest(ctx context.Context, request TranslationRequest, sessionId int32, transport os.ICancellationSignal, callback serviceTranslation.ITranslationCallback) error
OnFinishTranslationSession(ctx context.Context, sessionId int32) error
}
ITranslationDirectManagerServer is the server-side interface that user implementations provide to NewTranslationDirectManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ITranslationManager ¶
type ITranslationManager interface {
AsBinder() binder.IBinder
OnTranslationCapabilitiesRequest(ctx context.Context, sourceFormat int32, destFormat int32, receiver os.ResultReceiver) error
RegisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
UnregisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
OnSessionCreated(ctx context.Context, translationContext TranslationContext, sessionId int32, receiver internalOs.IResultReceiver) error
UpdateUiTranslationState(ctx context.Context, state int32, sourceSpec TranslationSpec, targetSpec TranslationSpec, viewIds []autofill.AutofillId, token binder.IBinder, taskId int32, uiTranslationSpec UiTranslationSpec) error
RegisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
UnregisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
GetServiceSettingsActivity(ctx context.Context, result internalOs.IResultReceiver) error
OnTranslationFinished(ctx context.Context, activityDestroyed bool, token binder.IBinder, componentName content.ComponentName) error
}
func NewTranslationManagerStub ¶
func NewTranslationManagerStub( impl ITranslationManagerServer, ) ITranslationManager
NewTranslationManagerStub creates a server-side ITranslationManager wrapping the given server implementation. The returned value satisfies ITranslationManager 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 ITranslationManagerServer ¶
type ITranslationManagerServer interface {
OnTranslationCapabilitiesRequest(ctx context.Context, sourceFormat int32, destFormat int32, receiver os.ResultReceiver) error
RegisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
UnregisterTranslationCapabilityCallback(ctx context.Context, callback os.IRemoteCallback) error
OnSessionCreated(ctx context.Context, translationContext TranslationContext, sessionId int32, receiver internalOs.IResultReceiver) error
UpdateUiTranslationState(ctx context.Context, state int32, sourceSpec TranslationSpec, targetSpec TranslationSpec, viewIds []autofill.AutofillId, token binder.IBinder, taskId int32, uiTranslationSpec UiTranslationSpec) error
RegisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
UnregisterUiTranslationStateCallback(ctx context.Context, callback os.IRemoteCallback) error
GetServiceSettingsActivity(ctx context.Context, result internalOs.IResultReceiver) error
OnTranslationFinished(ctx context.Context, activityDestroyed bool, token binder.IBinder, componentName content.ComponentName) error
}
ITranslationManagerServer is the server-side interface that user implementations provide to NewTranslationManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ITranslationServiceCallback ¶
type ITranslationServiceCallback interface {
AsBinder() binder.IBinder
UpdateTranslationCapability(ctx context.Context, capability TranslationCapability) error
}
func NewTranslationServiceCallbackStub ¶
func NewTranslationServiceCallbackStub( impl ITranslationServiceCallbackServer, ) ITranslationServiceCallback
NewTranslationServiceCallbackStub creates a server-side ITranslationServiceCallback wrapping the given server implementation. The returned value satisfies ITranslationServiceCallback 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 ITranslationServiceCallbackServer ¶
type ITranslationServiceCallbackServer interface {
UpdateTranslationCapability(ctx context.Context, capability TranslationCapability) error
}
ITranslationServiceCallbackServer is the server-side interface that user implementations provide to NewTranslationServiceCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type TranslationCapability ¶
func (*TranslationCapability) MarshalParcel ¶
func (s *TranslationCapability) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationCapability) UnmarshalParcel ¶
func (s *TranslationCapability) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationContext ¶
func (*TranslationContext) MarshalParcel ¶
func (s *TranslationContext) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationContext) UnmarshalParcel ¶
func (s *TranslationContext) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationDirectManagerProxy ¶
func NewTranslationDirectManagerProxy ¶
func NewTranslationDirectManagerProxy( remote binder.IBinder, ) *TranslationDirectManagerProxy
func (*TranslationDirectManagerProxy) AsBinder ¶
func (p *TranslationDirectManagerProxy) AsBinder() binder.IBinder
func (*TranslationDirectManagerProxy) OnFinishTranslationSession ¶
func (p *TranslationDirectManagerProxy) OnFinishTranslationSession( ctx context.Context, sessionId int32, ) error
func (*TranslationDirectManagerProxy) OnTranslationRequest ¶
func (p *TranslationDirectManagerProxy) OnTranslationRequest( ctx context.Context, request TranslationRequest, sessionId int32, transport os.ICancellationSignal, callback serviceTranslation.ITranslationCallback, ) error
type TranslationDirectManagerStub ¶
type TranslationDirectManagerStub struct {
Impl ITranslationDirectManager
Transport binder.VersionAwareTransport
}
TranslationDirectManagerStub dispatches incoming binder transactions to a typed ITranslationDirectManager implementation.
func (*TranslationDirectManagerStub) Descriptor ¶
func (s *TranslationDirectManagerStub) Descriptor() string
func (*TranslationDirectManagerStub) OnTransaction ¶
func (s *TranslationDirectManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type TranslationManagerProxy ¶
func GetTranslationManager ¶
func GetTranslationManager( ctx context.Context, sm *servicemanager.ServiceManager, ) (*TranslationManagerProxy, error)
GetTranslationManager retrieves the TranslationManagerService service and returns a typed proxy.
func GetUiTranslationService ¶
func GetUiTranslationService( ctx context.Context, sm *servicemanager.ServiceManager, ) (*TranslationManagerProxy, error)
GetUiTranslationService retrieves the UiTranslationService service and returns a typed proxy.
func NewTranslationManagerProxy ¶
func NewTranslationManagerProxy( remote binder.IBinder, ) *TranslationManagerProxy
func (*TranslationManagerProxy) AsBinder ¶
func (p *TranslationManagerProxy) AsBinder() binder.IBinder
func (*TranslationManagerProxy) GetServiceSettingsActivity ¶
func (p *TranslationManagerProxy) GetServiceSettingsActivity( ctx context.Context, result internalOs.IResultReceiver, ) error
func (*TranslationManagerProxy) OnSessionCreated ¶
func (p *TranslationManagerProxy) OnSessionCreated( ctx context.Context, translationContext TranslationContext, sessionId int32, receiver internalOs.IResultReceiver, ) error
func (*TranslationManagerProxy) OnTranslationCapabilitiesRequest ¶
func (p *TranslationManagerProxy) OnTranslationCapabilitiesRequest( ctx context.Context, sourceFormat int32, destFormat int32, receiver os.ResultReceiver, ) error
func (*TranslationManagerProxy) OnTranslationFinished ¶
func (p *TranslationManagerProxy) OnTranslationFinished( ctx context.Context, activityDestroyed bool, token binder.IBinder, componentName content.ComponentName, ) error
func (*TranslationManagerProxy) RegisterTranslationCapabilityCallback ¶
func (p *TranslationManagerProxy) RegisterTranslationCapabilityCallback( ctx context.Context, callback os.IRemoteCallback, ) error
func (*TranslationManagerProxy) RegisterUiTranslationStateCallback ¶
func (p *TranslationManagerProxy) RegisterUiTranslationStateCallback( ctx context.Context, callback os.IRemoteCallback, ) error
func (*TranslationManagerProxy) UnregisterTranslationCapabilityCallback ¶
func (p *TranslationManagerProxy) UnregisterTranslationCapabilityCallback( ctx context.Context, callback os.IRemoteCallback, ) error
func (*TranslationManagerProxy) UnregisterUiTranslationStateCallback ¶
func (p *TranslationManagerProxy) UnregisterUiTranslationStateCallback( ctx context.Context, callback os.IRemoteCallback, ) error
func (*TranslationManagerProxy) UpdateUiTranslationState ¶
func (p *TranslationManagerProxy) UpdateUiTranslationState( ctx context.Context, state int32, sourceSpec TranslationSpec, targetSpec TranslationSpec, viewIds []autofill.AutofillId, token binder.IBinder, taskId int32, uiTranslationSpec UiTranslationSpec, ) error
type TranslationManagerStub ¶
type TranslationManagerStub struct {
Impl ITranslationManager
Transport binder.VersionAwareTransport
}
TranslationManagerStub dispatches incoming binder transactions to a typed ITranslationManager implementation.
func (*TranslationManagerStub) Descriptor ¶
func (s *TranslationManagerStub) Descriptor() string
func (*TranslationManagerStub) OnTransaction ¶
func (s *TranslationManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type TranslationRequest ¶
type TranslationRequest struct {
Flags int32
}
func (*TranslationRequest) MarshalParcel ¶
func (s *TranslationRequest) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationRequest) UnmarshalParcel ¶
func (s *TranslationRequest) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationRequestValue ¶
type TranslationRequestValue struct {
Flg int32
}
func (*TranslationRequestValue) MarshalParcel ¶
func (s *TranslationRequestValue) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationRequestValue) UnmarshalParcel ¶
func (s *TranslationRequestValue) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationResponse ¶
func (*TranslationResponse) MarshalParcel ¶
func (s *TranslationResponse) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationResponse) UnmarshalParcel ¶
func (s *TranslationResponse) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationResponseValue ¶
func (*TranslationResponseValue) MarshalParcel ¶
func (s *TranslationResponseValue) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationResponseValue) UnmarshalParcel ¶
func (s *TranslationResponseValue) UnmarshalParcel( p *parcel.Parcel, ) error
type TranslationServiceCallbackProxy ¶
func NewTranslationServiceCallbackProxy ¶
func NewTranslationServiceCallbackProxy( remote binder.IBinder, ) *TranslationServiceCallbackProxy
func (*TranslationServiceCallbackProxy) AsBinder ¶
func (p *TranslationServiceCallbackProxy) AsBinder() binder.IBinder
func (*TranslationServiceCallbackProxy) UpdateTranslationCapability ¶
func (p *TranslationServiceCallbackProxy) UpdateTranslationCapability( ctx context.Context, capability TranslationCapability, ) error
type TranslationServiceCallbackStub ¶
type TranslationServiceCallbackStub struct {
Impl ITranslationServiceCallback
Transport binder.VersionAwareTransport
}
TranslationServiceCallbackStub dispatches incoming binder transactions to a typed ITranslationServiceCallback implementation.
func (*TranslationServiceCallbackStub) Descriptor ¶
func (s *TranslationServiceCallbackStub) Descriptor() string
func (*TranslationServiceCallbackStub) OnTransaction ¶
func (s *TranslationServiceCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type TranslationSpec ¶
func (*TranslationSpec) MarshalParcel ¶
func (s *TranslationSpec) MarshalParcel( p *parcel.Parcel, ) error
func (*TranslationSpec) UnmarshalParcel ¶
func (s *TranslationSpec) UnmarshalParcel( p *parcel.Parcel, ) error
type UiTranslationSpec ¶
type UiTranslationSpec struct {
Flg int32
}
func (*UiTranslationSpec) MarshalParcel ¶
func (s *UiTranslationSpec) MarshalParcel( p *parcel.Parcel, ) error
func (*UiTranslationSpec) UnmarshalParcel ¶
func (s *UiTranslationSpec) UnmarshalParcel( p *parcel.Parcel, ) error
type ViewTranslationRequest ¶
type ViewTranslationRequest struct {
AutofillId *types.AutofillId
}
func (*ViewTranslationRequest) MarshalParcel ¶
func (s *ViewTranslationRequest) MarshalParcel( p *parcel.Parcel, ) error
func (*ViewTranslationRequest) UnmarshalParcel ¶
func (s *ViewTranslationRequest) UnmarshalParcel( p *parcel.Parcel, ) error
type ViewTranslationResponse ¶
type ViewTranslationResponse struct {
AutofillId *types.AutofillId
}
func (*ViewTranslationResponse) MarshalParcel ¶
func (s *ViewTranslationResponse) MarshalParcel( p *parcel.Parcel, ) error
func (*ViewTranslationResponse) UnmarshalParcel ¶
func (s *ViewTranslationResponse) UnmarshalParcel( p *parcel.Parcel, ) error
Source Files
¶
- get_translation.go
- get_ui_translation.go
- itranslationdirectmanager.go
- itranslationmanager.go
- itranslationservicecallback.go
- translationcapability.go
- translationcontext.go
- translationrequest.go
- translationrequestvalue.go
- translationresponse.go
- translationresponsevalue.go
- translationspec.go
- uitranslationspec.go
- viewtranslationrequest.go
- viewtranslationresponse.go