-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiwindowcontainertoken.go
More file actions
91 lines (73 loc) · 2.5 KB
/
iwindowcontainertoken.go
File metadata and controls
91 lines (73 loc) · 2.5 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 window
import (
"context"
"fmt"
"github.com/AndroidGoLab/binder/binder"
"github.com/AndroidGoLab/binder/parcel"
)
// Code generated by aidlgen. DO NOT EDIT.
const DescriptorIWindowContainerToken = "android.window.IWindowContainerToken"
type IWindowContainerToken interface {
AsBinder() binder.IBinder
}
type WindowContainerTokenProxy struct {
Remote binder.IBinder
}
func NewWindowContainerTokenProxy(
remote binder.IBinder,
) *WindowContainerTokenProxy {
return &WindowContainerTokenProxy{Remote: remote}
}
func (p *WindowContainerTokenProxy) AsBinder() binder.IBinder {
return p.Remote
}
var _ IWindowContainerToken = (*WindowContainerTokenProxy)(nil)
// WindowContainerTokenStub dispatches incoming binder transactions
// to a typed IWindowContainerToken implementation.
type WindowContainerTokenStub struct {
Impl IWindowContainerToken
Transport binder.VersionAwareTransport
}
var _ binder.TransactionReceiver = (*WindowContainerTokenStub)(nil)
func (s *WindowContainerTokenStub) Descriptor() string {
return DescriptorIWindowContainerToken
}
func (s *WindowContainerTokenStub) 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)
}
}
// IWindowContainerTokenServer is the server-side interface that user implementations
// provide to NewWindowContainerTokenStub. It contains only the business methods,
// without AsBinder (which is provided by the stub itself).
type IWindowContainerTokenServer interface {
}
type windowContainerTokenStubWrapper struct {
impl IWindowContainerTokenServer
stubBinder *binder.StubBinder
}
func (w *windowContainerTokenStubWrapper) AsBinder() binder.IBinder {
return w.stubBinder
}
var _ IWindowContainerToken = (*windowContainerTokenStubWrapper)(nil)
// NewWindowContainerTokenStub creates a server-side IWindowContainerToken wrapping the given
// server implementation. The returned value satisfies IWindowContainerToken
// 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 NewWindowContainerTokenStub(
impl IWindowContainerTokenServer,
) IWindowContainerToken {
wrapper := &windowContainerTokenStubWrapper{impl: impl}
stub := &WindowContainerTokenStub{Impl: wrapper}
wrapper.stubBinder = binder.NewStubBinder(stub)
return wrapper
}