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
|
OBEX client API description
***************************
Copyright (C) 2007-2008 Marcel Holtmann <marcel@holtmann.org>
Client hierarchy
================
Service org.openobex.client
Interface org.openobex.Client
Object path /
Methods void SendFiles(dict device, array{string} files, object agent)
Send one or multiple local files to the specified
device. The device is configured via properties. At
least the Destination property should be specified.
void PullBusinessCard(dict device, string file)
Request the business card from a remote device and
store it in the local file.
void ExchangeBusinessCards(dict device, string clientfile, string file)
Push the client's business card to the remote device
and then retrieve the remote business card and store
it in a local file.
object CreateSession(dict device)
Create a new OBEX session. The device is configured
via properties like in SendFiles.
Properties string Target
string Source
string Destination
Session hierarchy
=================
Service org.openobex.client
Interface org.openobex.Session
Object path [variable prefix]/{session0,session1,...}
Methods dict GetProperties()
Returns all properties for the session.
void AssignAgent(object agent)
Assign an OBEX agent to this session. This allows
detailed progress reports about the transactions.
void ReleaseAgent(object agent)
Release a previously assigned OBEX agent.
File Transfer hierarchy
=======================
Service org.openobex.client
Interface org.openobex.FileTransfer
Object path [variable prefix]/{session0,session1,...}
Methods void ChangeFolder(string folder)
Change the current folder of the remote device.
void CreateFolder(string folder)
Create a new folder in the remote device.
array{dict} ListFolder()
Returns a dictionary containing information about
the current folder content.
The following keys are defined:
string Name : Object name in UTF-8 format
string Type : Either "folder" or "file"
uint64 Size : Object size or number of items in folder
string Permission : Group, owner and other permission
guint64 Modified : Last change
guint64 Accessed : Last access
guint64 Created : Creation date
void GetFile(string targetfile, string sourcefile)
Copy the source file (from remote device) to the
target file (on local filesystem).
A new Transfer object is created to represent this
transaction.
void PutFile(string sourcefile, string targetfile)
Copy the source file (from local filesystem) to the
target file (on remote device).
A new Transfer object is created to represent this
transaction.
void CopyFile(string sourcefile, string targetfile)
Copy a file within the remote device from source file
to target file.
void MoveFile(string sourcefile, string targetfile)
Movea file within the remote device from source file
to the target file.
void Delete(string file)
Deletes the specified file/folder.
Transfer hierarchy
==================
Service org.openobex.client
Interface org.openobex.Transfer
Object path [variable prefix]/{transfer0,transfer1,...}
Methods dict GetProperties()
Returns all properties for the transfer. See the
properties section for available properties.
void Cancel()
Cancels this transfer.
Properties string Name [read-only]
Name of the transferred object.
uint64 Size [read-only]
Size of the transferred object. If the size is
unknown, then this property will not be present.
Agent hierarchy
===============
Service unique name
Interface org.openobex.Agent
Object path freely definable
Methods void Release()
This method gets called when the service daemon
unregisters the agent. An agent can use it to do
cleanup tasks. There is no need to unregister the
agent, because when this method gets called it has
already been unregistered.
string Request(object transfer)
Accept or reject a new transfer (client and server)
and provide the filename for it.
In case of incoming transfers it is the filename
where to store the file and for outgoing transfers
it is the filename to show the remote device. If left
empty it will be calculated automatically.
Possible errors: org.openobex.Error.Rejected
org.openobex.Error.Canceled
void Progress(object transfer, uint64 transferred)
Progress within the transfer has been made. The
number of transferred bytes is given as second
argument for convenience.
void Complete(object transfer)
Informs that the transfer has completed sucessfully.
void Error(object transfer, string message)
Informs that the transfer has been terminated because
of some error.
|