File: auto.go

package info (click to toggle)
golang-github-linuxdeepin-go-dbus-factory 1.9.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,864 kB
  • sloc: xml: 11,754; makefile: 35; sh: 13
file content (358 lines) | stat: -rw-r--r-- 9,090 bytes parent folder | download
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
// Code generated by "./generator ./org.bluez.obex"; DO NOT EDIT.

package obex

import (
	"errors"
	"unsafe"

	"github.com/godbus/dbus"
	"github.com/linuxdeepin/go-dbus-factory/object_manager"
	"pkg.deepin.io/lib/dbusutil/proxy"
)

type ObjectManager struct {
	object_manager.ObjectManager // interface org.freedesktop.DBus.ObjectManager
	proxy.Object
}

func NewObjectManager(conn *dbus.Conn) *ObjectManager {
	obj := new(ObjectManager)
	obj.Object.Init_(conn, "org.bluez.obex", "/")
	return obj
}

type Manager struct {
	agentManager // interface org.bluez.obex.AgentManager1
	client       // interface org.bluez.obex.Client1
	proxy.Object
}

func NewManager(conn *dbus.Conn) *Manager {
	obj := new(Manager)
	obj.Object.Init_(conn, "org.bluez.obex", "/org/bluez/obex")
	return obj
}

func (obj *Manager) AgentManager() *agentManager {
	return &obj.agentManager
}

type agentManager struct{}

func (v *agentManager) GetObject_() *proxy.Object {
	return (*proxy.Object)(unsafe.Pointer(v))
}

func (*agentManager) GetInterfaceName_() string {
	return "org.bluez.obex.AgentManager1"
}

// method RegisterAgent

func (v *agentManager) GoRegisterAgent(flags dbus.Flags, ch chan *dbus.Call, agent dbus.ObjectPath) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".RegisterAgent", flags, ch, agent)
}

func (v *agentManager) RegisterAgent(flags dbus.Flags, agent dbus.ObjectPath) error {
	return (<-v.GoRegisterAgent(flags, make(chan *dbus.Call, 1), agent).Done).Err
}

// method UnregisterAgent

func (v *agentManager) GoUnregisterAgent(flags dbus.Flags, ch chan *dbus.Call, agent dbus.ObjectPath) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".UnregisterAgent", flags, ch, agent)
}

func (v *agentManager) UnregisterAgent(flags dbus.Flags, agent dbus.ObjectPath) error {
	return (<-v.GoUnregisterAgent(flags, make(chan *dbus.Call, 1), agent).Done).Err
}

func (obj *Manager) Client() *client {
	return &obj.client
}

type client struct{}

func (v *client) GetObject_() *proxy.Object {
	return (*proxy.Object)(unsafe.Pointer(v))
}

func (*client) GetInterfaceName_() string {
	return "org.bluez.obex.Client1"
}

// method CreateSession

func (v *client) GoCreateSession(flags dbus.Flags, ch chan *dbus.Call, destination string, args map[string]dbus.Variant) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".CreateSession", flags, ch, destination, args)
}

func (*client) StoreCreateSession(call *dbus.Call) (session dbus.ObjectPath, err error) {
	err = call.Store(&session)
	return
}

func (v *client) CreateSession(flags dbus.Flags, destination string, args map[string]dbus.Variant) (session dbus.ObjectPath, err error) {
	return v.StoreCreateSession(
		<-v.GoCreateSession(flags, make(chan *dbus.Call, 1), destination, args).Done)
}

// method RemoveSession

func (v *client) GoRemoveSession(flags dbus.Flags, ch chan *dbus.Call, session dbus.ObjectPath) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".RemoveSession", flags, ch, session)
}

func (v *client) RemoveSession(flags dbus.Flags, session dbus.ObjectPath) error {
	return (<-v.GoRemoveSession(flags, make(chan *dbus.Call, 1), session).Done).Err
}

type Session struct {
	session    // interface org.bluez.obex.Session1
	objectPush // interface org.bluez.obex.ObjectPush1
	proxy.Object
}

func NewSession(conn *dbus.Conn, path dbus.ObjectPath) (*Session, error) {
	if !path.IsValid() {
		return nil, errors.New("path is invalid")
	}
	obj := new(Session)
	obj.Object.Init_(conn, "org.bluez.obex", path)
	return obj, nil
}

func (obj *Session) Session() *session {
	return &obj.session
}

type session struct{}

func (v *session) GetObject_() *proxy.Object {
	return (*proxy.Object)(unsafe.Pointer(v))
}

func (*session) GetInterfaceName_() string {
	return "org.bluez.obex.Session1"
}

// method GetCapabilities

func (v *session) GoGetCapabilities(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetCapabilities", flags, ch)
}

func (*session) StoreGetCapabilities(call *dbus.Call) (capabilities string, err error) {
	err = call.Store(&capabilities)
	return
}

func (v *session) GetCapabilities(flags dbus.Flags) (capabilities string, err error) {
	return v.StoreGetCapabilities(
		<-v.GoGetCapabilities(flags, make(chan *dbus.Call, 1)).Done)
}

// property Source s

func (v *session) Source() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Source",
	}
}

// property Destination s

func (v *session) Destination() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Destination",
	}
}

// property Channel y

func (v *session) Channel() proxy.PropByte {
	return proxy.PropByte{
		Impl: v,
		Name: "Channel",
	}
}

// property Target s

func (v *session) Target() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Target",
	}
}

func (obj *Session) ObjectPush() *objectPush {
	return &obj.objectPush
}

type objectPush struct{}

func (v *objectPush) GetObject_() *proxy.Object {
	return (*proxy.Object)(unsafe.Pointer(v))
}

func (*objectPush) GetInterfaceName_() string {
	return "org.bluez.obex.ObjectPush1"
}

// method SendFile

func (v *objectPush) GoSendFile(flags dbus.Flags, ch chan *dbus.Call, sourcefile string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SendFile", flags, ch, sourcefile)
}

func (*objectPush) StoreSendFile(call *dbus.Call) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	err = call.Store(&transfer, &properties)
	return
}

func (v *objectPush) SendFile(flags dbus.Flags, sourcefile string) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	return v.StoreSendFile(
		<-v.GoSendFile(flags, make(chan *dbus.Call, 1), sourcefile).Done)
}

// method PullBusinessCard

func (v *objectPush) GoPullBusinessCard(flags dbus.Flags, ch chan *dbus.Call, targetfile string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".PullBusinessCard", flags, ch, targetfile)
}

func (*objectPush) StorePullBusinessCard(call *dbus.Call) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	err = call.Store(&transfer, &properties)
	return
}

func (v *objectPush) PullBusinessCard(flags dbus.Flags, targetfile string) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	return v.StorePullBusinessCard(
		<-v.GoPullBusinessCard(flags, make(chan *dbus.Call, 1), targetfile).Done)
}

// method ExchangeBusinessCards

func (v *objectPush) GoExchangeBusinessCards(flags dbus.Flags, ch chan *dbus.Call, clientfile string, targetfile string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ExchangeBusinessCards", flags, ch, clientfile, targetfile)
}

func (*objectPush) StoreExchangeBusinessCards(call *dbus.Call) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	err = call.Store(&transfer, &properties)
	return
}

func (v *objectPush) ExchangeBusinessCards(flags dbus.Flags, clientfile string, targetfile string) (transfer dbus.ObjectPath, properties map[string]dbus.Variant, err error) {
	return v.StoreExchangeBusinessCards(
		<-v.GoExchangeBusinessCards(flags, make(chan *dbus.Call, 1), clientfile, targetfile).Done)
}

type Transfer struct {
	transfer // interface org.bluez.obex.Transfer1
	proxy.Object
}

func NewTransfer(conn *dbus.Conn, path dbus.ObjectPath) (*Transfer, error) {
	if !path.IsValid() {
		return nil, errors.New("path is invalid")
	}
	obj := new(Transfer)
	obj.Object.Init_(conn, "org.bluez.obex", path)
	return obj, nil
}

type transfer struct{}

func (v *transfer) GetObject_() *proxy.Object {
	return (*proxy.Object)(unsafe.Pointer(v))
}

func (*transfer) GetInterfaceName_() string {
	return "org.bluez.obex.Transfer1"
}

// method Cancel

func (v *transfer) GoCancel(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Cancel", flags, ch)
}

func (v *transfer) Cancel(flags dbus.Flags) error {
	return (<-v.GoCancel(flags, make(chan *dbus.Call, 1)).Done).Err
}

// property Status s

func (v *transfer) Status() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Status",
	}
}

// property Session o

func (v *transfer) Session() proxy.PropObjectPath {
	return proxy.PropObjectPath{
		Impl: v,
		Name: "Session",
	}
}

// property Name s

func (v *transfer) Name() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Name",
	}
}

// property Type s

func (v *transfer) Type() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Type",
	}
}

// property Size t

func (v *transfer) Size() proxy.PropUint64 {
	return proxy.PropUint64{
		Impl: v,
		Name: "Size",
	}
}

// property Time t

func (v *transfer) Time() proxy.PropUint64 {
	return proxy.PropUint64{
		Impl: v,
		Name: "Time",
	}
}

// property Filename s

func (v *transfer) Filename() proxy.PropString {
	return proxy.PropString{
		Impl: v,
		Name: "Filename",
	}
}

// property Transferred t

func (v *transfer) Transferred() proxy.PropUint64 {
	return proxy.PropUint64{
		Impl: v,
		Name: "Transferred",
	}
}