/[soapbox]/obex-data-server/tags/REL-0_3_4/dbus-api.txt
ViewVC logotype

Contents of /obex-data-server/tags/REL-0_3_4/dbus-api.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1623 - (show annotations)
Mon Jul 21 17:15:57 2008 UTC (2 years, 1 month ago) by tadas
File MIME type: text/plain
File size: 15527 byte(s)
Release 0.3.4
1 [N] marks members that are not implemented yet !
2
3 Manager hierarchy
4 ===============================
5
6 Service org.openobex
7 Interface org.openobex.Manager
8 Object path /org/openobex
9
10 Methods object CreateBluetoothSession(string address, string pattern)
11
12 Create a Bluetooth OBEX session and return the new
13 session object path for it. Session is automatically connected.
14 The address represents the remote Bluetooth device and
15 the pattern specifies the OBEX service it connects to,
16 or the OBEX service using a fixed Bluetooth channel.
17 Pattern can be a UUID-128 identifying the service or
18 place holder as "opp" (for Object Push) or "ftp" (for FTP).
19 In case you want to use a fixed channel, UUID has to be
20 like: UUID:CHANNEL where UUID is a valid UUID or service
21 place holder like before, and CHANNEL is an integer
22 representing a valid RFCOMM channel. Session object can
23 only be used when Session.Connected signal is emitted.
24 If remote device refuses connection, Session.ErrorOccurred
25 signal with org.openobex.Error.ConnectionRefused
26 is emitted instead.
27
28 Returns object path for the created session.
29
30 Possible errors: org.openobex.Error.Failed
31 org.openobex.Error.InvalidArguments
32 org.openobex.Error.ConnectionAttemptFailed
33 org.openobex.Error.NotSupported
34 org.openobex.Error.TransportNotAvailable
35
36 object CreateBluetoothServer(string source_address, string pattern,
37 boolean require_pairing)
38
39 Gets BluetoothServer object for specified source address.
40 source_address can be Bluetooth address of any adapter or just
41 "00:00:00:00:00:00" for default adapter.
42 pattern specifies the type of server to create which may be
43 either "ftp" for OBEX FTP server, "opp" for OBEX Object Push server
44 or "pbap" for OBEX Phonebook Access server.
45 require_pairing specifies whether client device should be paired
46 before allowing any operations (recommended values: True for FTP,
47 False for OPP).
48
49 Returns object path for the created server.
50
51 Possible errors: org.openobex.Error.Failed
52 org.openobex.Error.InvalidArguments
53 org.openobex.Error.TransportNotAvailable
54
55 [N] object CreateIrdaSession()
56
57 [N] object CreateIrdaServer()
58
59 [N] object CreateInetSession(string destination_address)
60
61 [N] object CreateInetServer(string source_address)
62
63 [N] object CreateTtySession(string tty_device)
64
65 [N] object CreateTtyServer(string tty_device)
66
67 dict GetSessionInfo(object session_object)
68
69 Returns info about specified session:
70 "BluetoothAddress" : Target device Bluetooth address or blank if not bluetooth session;
71 If specified session does not exist, returns empty structure.
72 session_object specifies DBus path of Session object.
73
74 Possible errors: none
75
76 dict GetServerInfo(object server_object)
77
78 Returns info about specified server:
79 "BluetoothAddress" : Bluetooth source address or blank if not bluetooth server;
80 If specified session does not exist, returns empty structure.
81 server_object specifies DBus path of Server object.
82
83 Possible errors: none
84
85 Signals void SessionCreated(object path)
86
87 Signals the creation of a session object.
88
89 void SessionRemoved(object path)
90
91 Signals the removal of a session object.
92
93 Server hierarchy
94 ===============================
95
96 Service org.openobex
97 Interface org.openobex.Server
98 Object path /org/openobex/server{0,1,2...}
99
100 Methods void Start(string path, boolean allow_write, boolean auto_accept)
101
102 Starts OBEX Object Push / FTP server (begins
103 listening for connections). Started signal is emitted after
104 the server is started. If error occurs, ErrorOccured signal is emitted
105 instead. Once the server is started, it emits SessionCreated signal
106 for every newly connected client.
107
108 If this is Object Push server, path defines where all received files
109 will be saved. In case of FTP server path is the top-level folder which
110 will be served. allow_write specifies whether write operations
111 will be allowed (put and delete). In most cases, allow_write should be
112 set to True. auto_accept specifies whether incoming files should be
113 always accepted (recommended values: True for FTP, False for OPP). If
114 auto_accept is set to False, either Accept() or Reject() has to be called
115 every time after you receive TransferStarted signal in ServerSession
116 object.
117
118 Possible errors: org.openobex.Error.InvalidArguments
119 org.openobex.Error.NotAuthorized
120 org.openobex.Error.Started
121
122 void Stop()
123
124 Stops the server. All client connections will be closed and
125 operations will be cancelled. Stopped signal is emitted
126 after the server is stopped.
127
128 Possible errors: org.openobex.Error.NotAuthorized
129 org.openobex.Error.NotStarted
130
131 void Close()
132
133 Closes the server. If server is not stopped, all client connections
134 will be closed, operations will be cancelled. Server object will
135 be destroyed after that. Closed signal is emitted immediately
136 when this method is invoked.
137
138 Possible errors: org.openobex.Error.NotAuthorized
139
140 boolean IsStarted()
141
142 Returns true if server is started, false otherwise.
143
144 Possible errors: none
145
146 dict GetServerSessionInfo(object session_object)
147
148 Returns info about specified server session:
149 "BluetoothAddress" : Client device Bluetooth address;
150 If specified server session does not exist, returns empty structure.
151 session_object specifies DBus path of ServerSession object.
152
153 Possible errors: none
154
155 Signals void Started()
156
157 This signal informs that the server was started.
158
159 void Stopped()
160
161 This signal informs that the server was stopped and all operations
162 were ceased.
163
164 void Closed()
165
166 This signal informs that the server was closed and it's object is
167 no longer valid.
168
169 void ErrorOccured(string error_name, string error_message)
170
171 This signal informs that error occurred while starting or stopping
172 the server.
173
174 void SessionCreated(object session_object)
175
176 Signal informs that client connected to server and new ServerSession
177 object was created. Returns path of ServerSession object.
178
179 void SessionRemoved(object session_object)
180
181 Signal informs that client disconnected from server. Returns
182 path of ServerSession object that was closed.
183
184 Session hierarchy
185 ===============================
186
187 Service org.openobex
188 Interface org.openobex.Session
189 Object path /org/openobex/session{0,1,2...}
190
191 Methods void Connect()
192
193 Connects to remote device by sending OBEX connect command. This is
194 called automatically when you create new Session, hence normally
195 it shouldn't be used. When connecting succeeds, Connected signal
196 is emitted, ErrorOccurred signal with org.openobex.Error.ConnectionRefused
197 is emitted otherwise.
198
199 Possible errors: org.openobex.Error.Failed
200 org.openobex.Error.NotAuthorized
201 org.openobex.Error.OutOfMemory
202
203 void Disconnect()
204
205 Disconnects from remote device by sending OBEX disconnect command.
206 Disconnected signal is emitted once disconnected. Normally,
207 "Close" should be called immediately after Session is disconnected.
208
209 Possible errors: org.openobex.Error.Busy
210 org.openobex.Error.Failed
211 org.openobex.Error.NotAuthorized
212 org.openobex.Error.OutOfMemory
213
214 void Close()
215
216 Closes the session (the actual connection to remote device is closed).
217 Session object is finalized and can not be used anymore.
218 Closed signal is emitted once closed.
219
220 Possible errors: org.openobex.Error.Failed
221 org.openobex.Error.NotAuthorized
222
223 boolean IsConnected()
224
225 Returns true if connected to ObjectPush or FTP services on a remote
226 device, false otherwise.
227
228 Possible errors: none
229
230 void ChangeCurrentFolder(string path)
231
232 Changes current path on a remote device to the specified one.
233 If error occurs during operation, ErrorOccured signal is emitted.
234
235 Possible errors: org.openobex.Error.Busy
236 org.openobex.Error.Failed
237 org.openobex.Error.InvalidArguments
238 org.openobex.Error.NotAuthorized
239 org.openobex.Error.NotConnected
240 org.openobex.Error.OutOfMemory
241
242 void ChangeCurrentFolderBackward()
243
244 Changes current path on a remote device one level up. If current
245 folder is root, path is not changed.
246 If error occurs during operation, ErrorOccured signal is emitted.
247
248 Possible errors: org.openobex.Error.Busy
249 org.openobex.Error.Failed
250 org.openobex.Error.InvalidArguments
251 org.openobex.Error.NotAuthorized
252 org.openobex.Error.NotConnected
253 org.openobex.Error.OutOfMemory
254
255 void ChangeCurrentFolderToRoot()
256
257 Changes current path on a remote device to root.
258 If error occurs during operation, ErrorOccured signal is emitted.
259
260 Possible errors: org.openobex.Error.Busy
261 org.openobex.Error.Failed
262 org.openobex.Error.InvalidArguments
263 org.openobex.Error.NotAuthorized
264 org.openobex.Error.NotConnected
265 org.openobex.Error.OutOfMemory
266
267 string GetCurrentPath()
268
269 Returns current path on a remote device.
270
271 Possible errors: none
272
273 void CopyRemoteFile(string remote_filename, string local_path)
274
275 Starts receiving a specified file from a remote device.
276 remote_filename specifies the file to receive on a remote device.
277 local_path is the path where received file will be saved.
278 TransferStarted signal is emitted when transfer starts. If error
279 occurs during operation, ErrorOccured signal is emitted instead.
280
281 Possible errors: org.openobex.Error.Busy
282 org.openobex.Error.Failed
283 org.openobex.Error.InvalidArguments
284 org.openobex.Error.NotAuthorized
285 org.openobex.Error.NotConnected
286 org.openobex.Error.NotFound
287 org.openobex.Error.OutOfMemory
288
289 void CreateFolder(string folder_name)
290
291 Creates a folder on a remote device with a specified
292 name. If error occurs during operation, ErrorOccured signal
293 is emitted.
294
295 Possible errors: org.openobex.Error.Busy
296 org.openobex.Error.Failed
297 org.openobex.Error.InvalidArguments
298 org.openobex.Error.NotAuthorized
299 org.openobex.Error.NotConnected
300 org.openobex.Error.OutOfMemory
301
302 dict RetrieveFolderListing()
303
304 Retrieves the list of files in the current folder.
305 If error occurs during operation, ErrorOccured signal is emitted.
306
307 Possible errors:
308
309 dict GetCapability()
310
311 Retrieves the capability object.
312 If error occurs during operation, ErrorOccured signal is emitted.
313
314 Possible errors:
315
316 void SendFile(string local_path)
317
318 Starts sending a specified file to a remote device.
319 local_path specifies the path to file that will be sent.
320 TransferStarted signal is emitted when transfer starts. If error
321 occurs during operation, ErrorOccured signal is emitted.
322
323 Possible errors: org.openobex.Error.NotAuthorized
324 org.openobex.Error.NotConnected
325 org.openobex.Error.Busy
326 org.openobex.Error.InvalidArguments
327 org.openobex.Error.OutOfMemory
328 org.openobex.Error.NotFound
329 !! org.openobex.Error.Failed
330
331 void DeleteRemoteFile(string remote_filename)
332
333 Deletes specified file on remote device.
334 If error occurs during operation, ErrorOccured signal is emitted.
335
336 Possible errors:
337
338 dict GetTransferInfo()
339
340 Returns info about the ongoing transfer:
341 "LocalPath" : full local path;
342 "RemoteFilename" : filename;
343 "Size" : total bytes being transferred;
344 "Time" : last modification time of file being sent;
345
346 Possible errors: none
347
348 boolean IsBusy()
349
350 Returns true if there is an operation in progress, false otherwise.
351
352 Possible errors: none
353
354 void Cancel()
355
356 Cancels any operation that is in progress.
357
358 Possible errors:
359
360 Signals void Cancelled()
361
362 This signal informs that the current transfer was cancelled either by
363 client or by server.
364
365 void Connected()
366
367 This signal informs that the session is connected and ready for
368 operations.
369
370 void Disconnected()
371
372 This signal informs that the session was disconnected.
373
374 void Closed()
375
376 This signal informs that the session was terminated and that it's object
377 is no longer valid.
378
379 void TransferStarted(string filename, string local_path, uint64 total_bytes)
380
381 This signal informs that transfer was started.
382
383 total_bytes is the number of total bytes that are being sent (0
384 if total bytes are unknown). filename specifies the filename (without
385 path) of file being sent or null if it is unknown. local_path specifies
386 where the file is stored locally.
387
388 void TransferProgress(uint64 bytes_transferred)
389
390 This signal is emitted constantly during the transfer.
391 bytes_transferred specifies how many bytes were already transferred.
392
393 void TransferCompleted()
394
395 This signal informs that transfer was completed.
396
397 void ErrorOccurred(string error_name, string error_message)
398
399 This signal informs that error occurred while performing some operation.
400
401 ServerSession hierarchy
402 ===============================
403
404 Service org.openobex
405 Interface org.openobex.ServerSession
406 Object path /org/openobex/serversession{0,1,2...}
407
408 Methods void Accept()
409
410 Accepts incoming file (use this when auto_accept is set to False for
411 corresponding Server object). If auto_accept is True, this function will
412 do nothing. Call this method just after receiving TransferStarted signal.
413 If there is no transfer in progress or if current transfer is not
414 an incoming transfer, error will be returned.
415
416 Possible errors: org.openobex.Error.Failed
417
418 void Reject()
419
420 Rejects incoming file (use this when auto_accept is set to False for
421 corresponding Server object). If auto_accept is True, this function will
422 do nothing. Call this method just after receiving TransferStarted signal.
423 If there is no transfer in progress or if current transfer is not
424 an incoming transfer, error will be returned.
425
426 Possible errors: org.openobex.Error.Failed
427
428 void Disconnect()
429
430 Disconnects from remote device.
431 ServerSession object is finalized and can not be used anymore.
432 Disconnected signal is emitted once disconnected.
433
434 Possible errors:
435
436 dict GetTransferInfo()
437
438 Returns all info about the ongoing transfer (filename, local path,
439 total bytes).
440
441 Possible errors: none
442
443 void Cancel()
444
445 Cancels any operation that is in progress.
446
447 Possible errors:
448
449 Signals void Cancelled()
450
451 This signal informs that the current transfer was cancelled either by
452 client or by server.
453
454 void Disconnected()
455
456 This signal informs that the ServerSession was disconnected.
457 ServerSession object is finalized and can not be used anymore.
458
459 void TransferStarted(string filename, string local_path, uint64 total_bytes)
460
461 This signal informs that transfer was started.
462
463 total_bytes is the number of total bytes that are being sent (0
464 if total bytes are unknown). filename specifies the filename (without
465 path) of file being sent or null if it is unknown. local_path specifies
466 where the file is stored locally.
467
468 void TransferProgress(uint64 bytes_transferred)
469
470 This signal is emitted constantly during the transfer.
471 bytes_transferred specifies how many bytes were already transferred.
472
473 void TransferCompleted()
474
475 This signal informs that transfer was completed.
476
477 void ErrorOccurred(string error_name, string error_message)
478
479 This signal informs that error occurred while performing some operation.

tadas_AT_dailyda_DOT_com
ViewVC Help
Powered by ViewVC 1.1.7