obex-api.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894
  1. OBEX D-Bus API description
  2. **************************
  3. Client hierarchy
  4. ================
  5. Service org.bluez.obex
  6. Interface org.bluez.obex.Client1
  7. Object path /org/bluez/obex
  8. Methods object CreateSession(string destination, dict args)
  9. Create a new OBEX session for the given remote address.
  10. The last parameter is a dictionary to hold optional or
  11. type-specific parameters. Typical parameters that can
  12. be set in this dictionary include the following:
  13. string "Target" : type of session to be created
  14. string "Source" : local address to be used
  15. byte "Channel"
  16. The currently supported targets are the following:
  17. "ftp"
  18. "map"
  19. "opp"
  20. "pbap"
  21. "sync"
  22. Possible errors: org.bluez.obex.Error.InvalidArguments
  23. org.bluez.obex.Error.Failed
  24. void RemoveSession(object session)
  25. Unregister session and abort pending transfers.
  26. Possible errors: org.bluez.obex.Error.InvalidArguments
  27. org.bluez.obex.Error.NotAuthorized
  28. Session hierarchy
  29. =================
  30. Service org.bluez.obex
  31. Interface org.bluez.obex.Session1
  32. Object path /org/bluez/obex/server/session{0, 1, 2, ...} or
  33. /org/bluez/obex/client/session{0, 1, 2, ...}
  34. Methods string GetCapabilities()
  35. Get remote device capabilities.
  36. Possible errors: org.bluez.obex.Error.NotSupported
  37. org.bluez.obex.Error.Failed
  38. Properties string Source [readonly]
  39. Bluetooth adapter address
  40. string Destination [readonly]
  41. Bluetooth device address
  42. byte Channel [readonly]
  43. Bluetooth channel
  44. string Target [readonly]
  45. Target UUID
  46. string Root [readonly]
  47. Root path
  48. Transfer hierarchy
  49. ==================
  50. Service org.bluez.obex
  51. Interface org.bluez.obex.Transfer1
  52. Object path [Session object path]/transfer{0, 1, 2, ...}
  53. Methods void Cancel()
  54. Stops the current transference.
  55. Possible errors: org.bluez.obex.Error.NotAuthorized
  56. org.bluez.obex.Error.InProgress
  57. org.bluez.obex.Error.Failed
  58. void Suspend()
  59. Suspend transference.
  60. Possible errors: org.bluez.obex.Error.NotAuthorized
  61. org.bluez.obex.Error.NotInProgress
  62. Note that it is not possible to suspend transfers
  63. which are queued which is why NotInProgress is listed
  64. as possible error.
  65. void Resume()
  66. Resume transference.
  67. Possible errors: org.bluez.obex.Error.NotAuthorized
  68. org.bluez.obex.Error.NotInProgress
  69. Note that it is not possible to resume transfers
  70. which are queued which is why NotInProgress is listed
  71. as possible error.
  72. Properties string Status [readonly]
  73. Inform the current status of the transfer.
  74. Possible values: "queued", "active", "suspended",
  75. "complete" or "error"
  76. object Session [readonly]
  77. The object path of the session the transfer belongs
  78. to.
  79. string Name [readonly]
  80. Name of the transferred object. Either Name or Type
  81. or both will be present.
  82. string Type [readonly]
  83. Type of the transferred object. Either Name or Type
  84. or both will be present.
  85. uint64 Time [readonly, optional]
  86. Time of the transferred object if this is
  87. provided by the remote party.
  88. uint64 Size [readonly, optional]
  89. Size of the transferred object. If the size is
  90. unknown, then this property will not be present.
  91. uint64 Transferred [readonly, optional]
  92. Number of bytes transferred. For queued transfers, this
  93. value will not be present.
  94. string Filename [readonly, optional]
  95. Complete name of the file being received or sent.
  96. For incoming object push transaction, this will be
  97. the proposed default location and name. It can be
  98. overwritten by the AuthorizePush agent callback
  99. and will be then updated accordingly.
  100. Object Push hierarchy
  101. =====================
  102. Service org.bluez.obex
  103. Interface org.bluez.obex.ObjectPush1
  104. Object path [Session object path]
  105. Methods object, dict SendFile(string sourcefile)
  106. Send one local file to the remote device.
  107. The returned path represents the newly created transfer,
  108. which should be used to find out if the content has been
  109. successfully transferred or if the operation fails.
  110. The properties of this transfer are also returned along
  111. with the object path, to avoid a call to GetProperties.
  112. Possible errors: org.bluez.obex.Error.InvalidArguments
  113. org.bluez.obex.Error.Failed
  114. object, dict PullBusinessCard(string targetfile)
  115. Request the business card from a remote device and
  116. store it in the local file.
  117. If an empty target file is given, a name will be
  118. automatically calculated for the temporary file.
  119. The returned path represents the newly created transfer,
  120. which should be used to find out if the content has been
  121. successfully transferred or if the operation fails.
  122. The properties of this transfer are also returned along
  123. with the object path, to avoid a call to GetProperties.
  124. Possible errors: org.bluez.obex.Error.InvalidArguments
  125. org.bluez.obex.Error.Failed
  126. object, dict ExchangeBusinessCards(string clientfile,
  127. string targetfile)
  128. Push the client's business card to the remote device
  129. and then retrieve the remote business card and store
  130. it in a local file.
  131. If an empty target file is given, a name will be
  132. automatically calculated for the temporary file.
  133. The returned path represents the newly created transfer,
  134. which should be used to find out if the content has been
  135. successfully transferred or if the operation fails.
  136. The properties of this transfer are also returned along
  137. with the object path, to avoid a call to GetProperties.
  138. Possible errors: org.bluez.obex.Error.InvalidArguments
  139. org.bluez.obex.Error.Failed
  140. File Transfer hierarchy
  141. =======================
  142. Service org.bluez.obex
  143. Interface org.bluez.obex.FileTransfer
  144. Object path [Session object path]
  145. Methods void ChangeFolder(string folder)
  146. Change the current folder of the remote device.
  147. Possible errors: org.bluez.obex.Error.InvalidArguments
  148. org.bluez.obex.Error.Failed
  149. void CreateFolder(string folder)
  150. Create a new folder in the remote device.
  151. Possible errors: org.bluez.obex.Error.InvalidArguments
  152. org.bluez.obex.Error.Failed
  153. array{dict} ListFolder()
  154. Returns a dictionary containing information about
  155. the current folder content.
  156. The following keys are defined:
  157. string Name : Object name in UTF-8 format
  158. string Type : Either "folder" or "file"
  159. uint64 Size : Object size or number of items in
  160. folder
  161. string Permission : Group, owner and other
  162. permission
  163. uint64 Modified : Last change
  164. uint64 Accessed : Last access
  165. uint64 Created : Creation date
  166. Possible errors: org.bluez.obex.Error.Failed
  167. object, dict GetFile(string targetfile, string sourcefile)
  168. Copy the source file (from remote device) to the
  169. target file (on local filesystem).
  170. If an empty target file is given, a name will be
  171. automatically calculated for the temporary file.
  172. The returned path represents the newly created transfer,
  173. which should be used to find out if the content has been
  174. successfully transferred or if the operation fails.
  175. The properties of this transfer are also returned along
  176. with the object path, to avoid a call to GetProperties.
  177. Possible errors: org.bluez.obex.Error.InvalidArguments
  178. org.bluez.obex.Error.Failed
  179. object, dict PutFile(string sourcefile, string targetfile)
  180. Copy the source file (from local filesystem) to the
  181. target file (on remote device).
  182. The returned path represents the newly created transfer,
  183. which should be used to find out if the content has been
  184. successfully transferred or if the operation fails.
  185. The properties of this transfer are also returned along
  186. with the object path, to avoid a call to GetProperties.
  187. Possible errors: org.bluez.obex.Error.InvalidArguments
  188. org.bluez.obex.Error.Failed
  189. void CopyFile(string sourcefile, string targetfile)
  190. Copy a file within the remote device from source file
  191. to target file.
  192. Possible errors: org.bluez.obex.Error.InvalidArguments
  193. org.bluez.obex.Error.Failed
  194. void MoveFile(string sourcefile, string targetfile)
  195. Move a file within the remote device from source file
  196. to the target file.
  197. Possible errors: org.bluez.obex.Error.InvalidArguments
  198. org.bluez.obex.Error.Failed
  199. void Delete(string file)
  200. Deletes the specified file/folder.
  201. Possible errors: org.bluez.obex.Error.InvalidArguments
  202. org.bluez.obex.Error.Failed
  203. Phonebook Access hierarchy
  204. ==========================
  205. Service org.bluez.obex
  206. Interface org.bluez.obex.PhonebookAccess1
  207. Object path [Session object path]
  208. Methods void Select(string location, string phonebook)
  209. Select the phonebook object for other operations. Should
  210. be call before all the other operations.
  211. location : Where the phonebook is stored, possible
  212. inputs :
  213. "int" ( "internal" which is default )
  214. "sim" ( "sim1" )
  215. "sim2"
  216. ...
  217. phonebook : Possible inputs :
  218. "pb" : phonebook for the saved contacts
  219. "ich": incoming call history
  220. "och": outgoing call history
  221. "mch": missing call history
  222. "cch": combination of ich och mch
  223. "spd": speed dials entry ( only for "internal" )
  224. "fav": favorites entry ( only for "internal" )
  225. Possible errors: org.bluez.obex.Error.InvalidArguments
  226. org.bluez.obex.Error.Failed
  227. object, dict PullAll(string targetfile, dict filters)
  228. Return the entire phonebook object from the PSE server
  229. in plain string with vcard format, and store it in
  230. a local file.
  231. If an empty target file is given, a name will be
  232. automatically calculated for the temporary file.
  233. The returned path represents the newly created transfer,
  234. which should be used to find out if the content has been
  235. successfully transferred or if the operation fails.
  236. The properties of this transfer are also returned along
  237. with the object path, to avoid a call to GetProperties.
  238. Possible filters: Format, Order, Offset, MaxCount and
  239. Fields
  240. Possible errors: org.bluez.obex.Error.InvalidArguments
  241. org.bluez.obex.Forbidden
  242. array{string vcard, string name} List(dict filters)
  243. Return an array of vcard-listing data where every entry
  244. consists of a pair of strings containing the vcard
  245. handle and the contact name. For example:
  246. "1.vcf" : "John"
  247. Possible filters: Order, Offset and MaxCount
  248. Possible errors: org.bluez.obex.Error.InvalidArguments
  249. org.bluez.obex.Forbidden
  250. object, dict
  251. Pull(string vcard, string targetfile, dict filters)
  252. Given a vcard handle, retrieve the vcard in the current
  253. phonebook object and store it in a local file.
  254. If an empty target file is given, a name will be
  255. automatically calculated for the temporary file.
  256. The returned path represents the newly created transfer,
  257. which should be used to find out if the content has been
  258. successfully transferred or if the operation fails.
  259. The properties of this transfer are also returned along
  260. with the object path, to avoid a call to GetProperties.
  261. Possbile filters: Format and Fields
  262. Possible errors: org.bluez.obex.Error.InvalidArguments
  263. org.bluez.obex.Error.Forbidden
  264. org.bluez.obex.Error.Failed
  265. array{string vcard, string name}
  266. Search(string field, string value, dict filters)
  267. Search for entries matching the given condition and
  268. return an array of vcard-listing data where every entry
  269. consists of a pair of strings containing the vcard
  270. handle and the contact name.
  271. vcard : name paired string match the search condition.
  272. field : the field in the vcard to search with
  273. { "name" (default) | "number" | "sound" }
  274. value : the string value to search for
  275. Possible filters: Order, Offset and MaxCount
  276. Possible errors: org.bluez.obex.Error.InvalidArguments
  277. org.bluez.obex.Error.Forbidden
  278. org.bluez.obex.Error.Failed
  279. uint16 GetSize()
  280. Return the number of entries in the selected phonebook
  281. object that are actually used (i.e. indexes that
  282. correspond to non-NULL entries).
  283. Possible errors: org.bluez.obex.Error.Forbidden
  284. org.bluez.obex.Error.Failed
  285. void UpdateVersion()
  286. Attempt to update PrimaryCounter and SecondaryCounter.
  287. Possible errors: org.bluez.obex.Error.NotSupported
  288. org.bluez.obex.Error.Forbidden
  289. org.bluez.obex.Error.Failed
  290. array{string} ListFilterFields()
  291. Return All Available fields that can be used in Fields
  292. filter.
  293. Possible errors: None
  294. Filter: string Format:
  295. Items vcard format
  296. Possible values: "vcard21" (default) or "vcard30"
  297. string Order:
  298. Items order
  299. Possible values: "indexed" (default), "alphanumeric" or
  300. "phonetic"
  301. uint16 Offset:
  302. Offset of the first item, default is 0
  303. uint16 MaxCount:
  304. Maximum number of items, default is unlimited (65535)
  305. array{string} Fields:
  306. Item vcard fields, default is all values.
  307. Possible values can be query with ListFilterFields.
  308. array{string} FilterAll:
  309. Filter items by fields using AND logic, cannot be used
  310. together with FilterAny.
  311. Possible values can be query with ListFilterFields.
  312. array{string} FilterAny:
  313. Filter items by fields using OR logic, cannot be used
  314. together with FilterAll.
  315. Possible values can be query with ListFilterFields.
  316. bool ResetNewMissedCalls
  317. Reset new the missed calls items, shall only be used
  318. for folders mch and cch.
  319. Properties string Folder [readonly]
  320. Current folder.
  321. string DatabaseIdentifier [readonly, optional]
  322. 128 bits persistent database identifier.
  323. Possible values: 32-character hexadecimal such
  324. as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
  325. string PrimaryCounter [readonly, optional]
  326. 128 bits primary version counter.
  327. Possible values: 32-character hexadecimal such
  328. as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
  329. string SecondaryCounter [readonly, optional]
  330. 128 bits secondary version counter.
  331. Possible values: 32-character hexadecimal such
  332. as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
  333. bool FixedImageSize [readonly, optional]
  334. Indicate support for fixed image size.
  335. Possible values: True if image is JPEG 300x300 pixels
  336. otherwise False.
  337. Synchronization hierarchy
  338. =========================
  339. Service org.bluez.obex
  340. Interface org.bluez.obex.Synchronization1
  341. Object path [Session object path]
  342. Methods void SetLocation(string location)
  343. Set the phonebook object store location for other
  344. operations. Should be called before all the other
  345. operations.
  346. location: Where the phonebook is stored, possible
  347. values:
  348. "int" ( "internal" which is default )
  349. "sim1"
  350. "sim2"
  351. ......
  352. Possible errors: org.bluez.obex.Error.InvalidArguments
  353. object, dict GetPhonebook(string targetfile)
  354. Retrieve an entire Phonebook Object store from remote
  355. device, and stores it in a local file.
  356. If an empty target file is given, a name will be
  357. automatically calculated for the temporary file.
  358. The returned path represents the newly created transfer,
  359. which should be used to find out if the content has been
  360. successfully transferred or if the operation fails.
  361. The properties of this transfer are also returned along
  362. with the object path, to avoid a call to GetProperties.
  363. Possible errors: org.bluez.obex.Error.InvalidArguments
  364. org.bluez.obex.Error.Failed
  365. object, dict PutPhonebook(string sourcefile)
  366. Send an entire Phonebook Object store to remote device.
  367. The returned path represents the newly created transfer,
  368. which should be used to find out if the content has been
  369. successfully transferred or if the operation fails.
  370. The properties of this transfer are also returned along
  371. with the object path, to avoid a call to GetProperties.
  372. Possible errors: org.bluez.obex.Error.InvalidArguments
  373. org.bluez.obex.Error.Failed
  374. Message Access hierarchy
  375. =========================
  376. Service org.bluez.obex
  377. Interface org.bluez.obex.MessageAccess1
  378. Object path [Session object path]
  379. Methods void SetFolder(string name)
  380. Set working directory for current session, *name* may
  381. be the directory name or '..[/dir]'.
  382. Possible errors: org.bluez.obex.Error.InvalidArguments
  383. org.bluez.obex.Error.Failed
  384. array{dict} ListFolders(dict filter)
  385. Returns a dictionary containing information about
  386. the current folder content.
  387. The following keys are defined:
  388. string Name : Folder name
  389. Possible filters: Offset and MaxCount
  390. Possible errors: org.bluez.obex.Error.InvalidArguments
  391. org.bluez.obex.Error.Failed
  392. array{string} ListFilterFields()
  393. Return all available fields that can be used in Fields
  394. filter.
  395. Possible errors: None
  396. array{object, dict} ListMessages(string folder, dict filter)
  397. Returns an array containing the messages found in the
  398. given subfolder of the current folder, or in the
  399. current folder if folder is empty.
  400. Possible Filters: Offset, MaxCount, SubjectLength, Fields,
  401. Type, PeriodStart, PeriodEnd, Status, Recipient, Sender,
  402. Priority
  403. Each message is represented by an object path followed
  404. by a dictionary of the properties.
  405. Properties:
  406. string Subject:
  407. Message subject
  408. string Timestamp:
  409. Message timestamp
  410. string Sender:
  411. Message sender name
  412. string SenderAddress:
  413. Message sender address
  414. string ReplyTo:
  415. Message Reply-To address
  416. string Recipient:
  417. Message recipient name
  418. string RecipientAddress:
  419. Message recipient address
  420. string Type:
  421. Message type
  422. Possible values: "email", "sms-gsm",
  423. "sms-cdma" and "mms"
  424. uint64 Size:
  425. Message size in bytes
  426. boolean Text:
  427. Message text flag
  428. Specifies whether message has textual
  429. content or is binary only
  430. string Status:
  431. Message status
  432. Possible values for received messages:
  433. "complete", "fractioned", "notification"
  434. Possible values for sent messages:
  435. "delivery-success", "sending-success",
  436. "delivery-failure", "sending-failure"
  437. uint64 AttachmentSize:
  438. Message overall attachment size in bytes
  439. boolean Priority:
  440. Message priority flag
  441. boolean Read:
  442. Message read flag
  443. boolean Sent:
  444. Message sent flag
  445. boolean Protected:
  446. Message protected flag
  447. Possible errors: org.bluez.obex.Error.InvalidArguments
  448. org.bluez.obex.Error.Failed
  449. void UpdateInbox(void)
  450. Request remote to update its inbox.
  451. Possible errors: org.bluez.obex.Error.Failed
  452. object, dict
  453. PushMessage(string sourcefile, string folder, dict args)
  454. Transfer a message (in bMessage format) to the
  455. remote device.
  456. The message is transferred either to the given
  457. subfolder of the current folder, or to the current
  458. folder if folder is empty.
  459. Possible args: Transparent, Retry, Charset
  460. The returned path represents the newly created transfer,
  461. which should be used to find out if the content has been
  462. successfully transferred or if the operation fails.
  463. The properties of this transfer are also returned along
  464. with the object path, to avoid a call to GetAll.
  465. Possible errors: org.bluez.obex.Error.InvalidArguments
  466. org.bluez.obex.Error.Failed
  467. Filter: uint16 Offset:
  468. Offset of the first item, default is 0
  469. uint16 MaxCount:
  470. Maximum number of items, default is 1024
  471. byte SubjectLength:
  472. Maximum length of the Subject property in the
  473. message, default is 256
  474. array{string} Fields:
  475. Message fields, default is all values.
  476. Possible values can be query with ListFilterFields.
  477. array{string} Types:
  478. Filter messages by type.
  479. Possible values: "sms", "email", "mms".
  480. string PeriodBegin:
  481. Filter messages by starting period.
  482. Possible values: Date in "YYYYMMDDTHHMMSS" format.
  483. string PeriodEnd:
  484. Filter messages by ending period.
  485. Possible values: Date in "YYYYMMDDTHHMMSS" format.
  486. boolean Read:
  487. Filter messages by read flag.
  488. Possible values: True for read or False for unread
  489. string Recipient:
  490. Filter messages by recipient address.
  491. string Sender:
  492. Filter messages by sender address.
  493. boolean Priority:
  494. Filter messages by priority flag.
  495. Possible values: True for high priority or False for
  496. non-high priority
  497. Message hierarchy
  498. =================
  499. Service org.bluez.obex
  500. Interface org.bluez.obex.Message1
  501. Object path [Session object path]/{message0,...}
  502. Methods object, dict Get(string targetfile, boolean attachment)
  503. Download message and store it in the target file.
  504. If an empty target file is given, a temporary file
  505. will be automatically generated.
  506. The returned path represents the newly created transfer,
  507. which should be used to find out if the content has been
  508. successfully transferred or if the operation fails.
  509. The properties of this transfer are also returned along
  510. with the object path, to avoid a call to GetProperties.
  511. Possible errors: org.bluez.obex.Error.InvalidArguments
  512. org.bluez.obex.Error.Failed
  513. Properties string Folder [readonly]
  514. Folder which the message belongs to
  515. string Subject [readonly]
  516. Message subject
  517. string Timestamp [readonly]
  518. Message timestamp
  519. string Sender [readonly]
  520. Message sender name
  521. string SenderAddress [readonly]
  522. Message sender address
  523. string ReplyTo [readonly]
  524. Message Reply-To address
  525. string Recipient [readonly]
  526. Message recipient name
  527. string RecipientAddress [readonly]
  528. Message recipient address
  529. string Type [readonly]
  530. Message type
  531. Possible values: "email", "sms-gsm",
  532. "sms-cdma" and "mms"
  533. uint64 Size [readonly]
  534. Message size in bytes
  535. string Status [readonly]
  536. Message reception status
  537. Possible values: "complete",
  538. "fractioned" and "notification"
  539. boolean Priority [readonly]
  540. Message priority flag
  541. boolean Read [read/write]
  542. Message read flag
  543. boolean Deleted [writeonly]
  544. Message deleted flag
  545. boolean Sent [readonly]
  546. Message sent flag
  547. boolean Protected [readonly]
  548. Message protected flag