-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimediaextractor.go
More file actions
91 lines (73 loc) · 2.3 KB
/
imediaextractor.go
File metadata and controls
91 lines (73 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package android
import (
"context"
"fmt"
"github.com/AndroidGoLab/binder/binder"
"github.com/AndroidGoLab/binder/parcel"
)
// Code generated by aidlgen. DO NOT EDIT.
const DescriptorIMediaExtractor = "android.IMediaExtractor"
type IMediaExtractor interface {
AsBinder() binder.IBinder
}
type MediaExtractorProxy struct {
Remote binder.IBinder
}
func NewMediaExtractorProxy(
remote binder.IBinder,
) *MediaExtractorProxy {
return &MediaExtractorProxy{Remote: remote}
}
func (p *MediaExtractorProxy) AsBinder() binder.IBinder {
return p.Remote
}
var _ IMediaExtractor = (*MediaExtractorProxy)(nil)
// MediaExtractorStub dispatches incoming binder transactions
// to a typed IMediaExtractor implementation.
type MediaExtractorStub struct {
Impl IMediaExtractor
Transport binder.VersionAwareTransport
}
var _ binder.TransactionReceiver = (*MediaExtractorStub)(nil)
func (s *MediaExtractorStub) Descriptor() string {
return DescriptorIMediaExtractor
}
func (s *MediaExtractorStub) OnTransaction(
ctx context.Context,
code binder.TransactionCode,
_data *parcel.Parcel,
) (*parcel.Parcel, error) {
if _, _err := _data.ReadInterfaceToken(); _err != nil {
return nil, _err
}
switch code {
default:
return nil, fmt.Errorf("unknown transaction code %d", code)
}
}
// IMediaExtractorServer is the server-side interface that user implementations
// provide to NewMediaExtractorStub. It contains only the business methods,
// without AsBinder (which is provided by the stub itself).
type IMediaExtractorServer interface {
}
type mediaExtractorStubWrapper struct {
impl IMediaExtractorServer
stubBinder *binder.StubBinder
}
func (w *mediaExtractorStubWrapper) AsBinder() binder.IBinder {
return w.stubBinder
}
var _ IMediaExtractor = (*mediaExtractorStubWrapper)(nil)
// NewMediaExtractorStub creates a server-side IMediaExtractor wrapping the given
// server implementation. The returned value satisfies IMediaExtractor
// and can be passed to proxy methods; its AsBinder() returns a
// *binder.StubBinder that is auto-registered with the binder
// driver on first use.
func NewMediaExtractorStub(
impl IMediaExtractorServer,
) IMediaExtractor {
wrapper := &mediaExtractorStubWrapper{impl: impl}
stub := &MediaExtractorStub{Impl: wrapper}
wrapper.stubBinder = binder.NewStubBinder(stub)
return wrapper
}