Documentation
¶
Index ¶
- Constants
- type IPdfEditor
- type IPdfEditorServer
- type IPdfRenderer
- type IPdfRendererServer
- type PdfEditorProxy
- func (p *PdfEditorProxy) ApplyPrintAttributes(ctx context.Context, attributes print.PrintAttributes) error
- func (p *PdfEditorProxy) AsBinder() binder.IBinder
- func (p *PdfEditorProxy) CloseDocument(ctx context.Context) error
- func (p *PdfEditorProxy) OpenDocument(ctx context.Context, source int32) (int32, error)
- func (p *PdfEditorProxy) RemovePages(ctx context.Context, pages []print.PageRange) error
- func (p *PdfEditorProxy) Write(ctx context.Context, destination int32) error
- type PdfEditorStub
- type PdfRendererProxy
- func (p *PdfRendererProxy) AsBinder() binder.IBinder
- func (p *PdfRendererProxy) CloseDocument(ctx context.Context) error
- func (p *PdfRendererProxy) OpenDocument(ctx context.Context, source int32) (int32, error)
- func (p *PdfRendererProxy) RenderPage(ctx context.Context, pageIndex int32, bitmapWidth int32, bitmapHeight int32, ...) error
- type PdfRendererStub
Constants ¶
const ( TransactionIPdfEditorOpenDocument = binder.FirstCallTransaction + 0 TransactionIPdfEditorRemovePages = binder.FirstCallTransaction + 1 TransactionIPdfEditorApplyPrintAttributes = binder.FirstCallTransaction + 2 TransactionIPdfEditorWrite = binder.FirstCallTransaction + 3 TransactionIPdfEditorCloseDocument = binder.FirstCallTransaction + 4 )
const ( MethodIPdfEditorOpenDocument = "openDocument" MethodIPdfEditorRemovePages = "removePages" MethodIPdfEditorApplyPrintAttributes = "applyPrintAttributes" MethodIPdfEditorWrite = "write" MethodIPdfEditorCloseDocument = "closeDocument" )
const ( TransactionIPdfRendererOpenDocument = binder.FirstCallTransaction + 0 TransactionIPdfRendererRenderPage = binder.FirstCallTransaction + 1 TransactionIPdfRendererCloseDocument = binder.FirstCallTransaction + 2 )
const ( MethodIPdfRendererOpenDocument = "openDocument" MethodIPdfRendererRenderPage = "renderPage" MethodIPdfRendererCloseDocument = "closeDocument" )
const DescriptorIPdfEditor = "com.android.printspooler.renderer.IPdfEditor"
const DescriptorIPdfRenderer = "com.android.printspooler.renderer.IPdfRenderer"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPdfEditor ¶
type IPdfEditor interface {
AsBinder() binder.IBinder
OpenDocument(ctx context.Context, source int32) (int32, error)
RemovePages(ctx context.Context, pages []print.PageRange) error
ApplyPrintAttributes(ctx context.Context, attributes print.PrintAttributes) error
Write(ctx context.Context, destination int32) error
CloseDocument(ctx context.Context) error
}
func NewPdfEditorStub ¶
func NewPdfEditorStub( impl IPdfEditorServer, ) IPdfEditor
NewPdfEditorStub creates a server-side IPdfEditor wrapping the given server implementation. The returned value satisfies IPdfEditor 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 IPdfEditorServer ¶
type IPdfEditorServer interface {
OpenDocument(ctx context.Context, source int32) (int32, error)
RemovePages(ctx context.Context, pages []print.PageRange) error
ApplyPrintAttributes(ctx context.Context, attributes print.PrintAttributes) error
Write(ctx context.Context, destination int32) error
CloseDocument(ctx context.Context) error
}
IPdfEditorServer is the server-side interface that user implementations provide to NewPdfEditorStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IPdfRenderer ¶
type IPdfRenderer interface {
AsBinder() binder.IBinder
OpenDocument(ctx context.Context, source int32) (int32, error)
RenderPage(ctx context.Context, pageIndex int32, bitmapWidth int32, bitmapHeight int32, attributes print.PrintAttributes, destination int32) error
CloseDocument(ctx context.Context) error
}
func NewPdfRendererStub ¶
func NewPdfRendererStub( impl IPdfRendererServer, ) IPdfRenderer
NewPdfRendererStub creates a server-side IPdfRenderer wrapping the given server implementation. The returned value satisfies IPdfRenderer 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 IPdfRendererServer ¶
type IPdfRendererServer interface {
OpenDocument(ctx context.Context, source int32) (int32, error)
RenderPage(ctx context.Context, pageIndex int32, bitmapWidth int32, bitmapHeight int32, attributes print.PrintAttributes, destination int32) error
CloseDocument(ctx context.Context) error
}
IPdfRendererServer is the server-side interface that user implementations provide to NewPdfRendererStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type PdfEditorProxy ¶
func NewPdfEditorProxy ¶
func NewPdfEditorProxy( remote binder.IBinder, ) *PdfEditorProxy
func (*PdfEditorProxy) ApplyPrintAttributes ¶
func (p *PdfEditorProxy) ApplyPrintAttributes( ctx context.Context, attributes print.PrintAttributes, ) error
func (*PdfEditorProxy) AsBinder ¶
func (p *PdfEditorProxy) AsBinder() binder.IBinder
func (*PdfEditorProxy) CloseDocument ¶
func (p *PdfEditorProxy) CloseDocument( ctx context.Context, ) error
func (*PdfEditorProxy) OpenDocument ¶
func (*PdfEditorProxy) RemovePages ¶
type PdfEditorStub ¶
type PdfEditorStub struct {
Impl IPdfEditor
Transport binder.VersionAwareTransport
}
PdfEditorStub dispatches incoming binder transactions to a typed IPdfEditor implementation.
func (*PdfEditorStub) Descriptor ¶
func (s *PdfEditorStub) Descriptor() string
func (*PdfEditorStub) OnTransaction ¶
func (s *PdfEditorStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type PdfRendererProxy ¶
func NewPdfRendererProxy ¶
func NewPdfRendererProxy( remote binder.IBinder, ) *PdfRendererProxy
func (*PdfRendererProxy) AsBinder ¶
func (p *PdfRendererProxy) AsBinder() binder.IBinder
func (*PdfRendererProxy) CloseDocument ¶
func (p *PdfRendererProxy) CloseDocument( ctx context.Context, ) error
func (*PdfRendererProxy) OpenDocument ¶
func (*PdfRendererProxy) RenderPage ¶
func (p *PdfRendererProxy) RenderPage( ctx context.Context, pageIndex int32, bitmapWidth int32, bitmapHeight int32, attributes print.PrintAttributes, destination int32, ) error
type PdfRendererStub ¶
type PdfRendererStub struct {
Impl IPdfRenderer
Transport binder.VersionAwareTransport
}
PdfRendererStub dispatches incoming binder transactions to a typed IPdfRenderer implementation.
func (*PdfRendererStub) Descriptor ¶
func (s *PdfRendererStub) Descriptor() string
func (*PdfRendererStub) OnTransaction ¶
func (s *PdfRendererStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)