User Tools

Site Tools


obex-data-server:migrating_to_0.4

Migrating to 0.4 API

This page describes obex-data-server API changes between versions 0.3.4 and 0.4 and how to migrate to the new API.

The main API change is that Session.Connected() signal was removed. Manager.SessionConnected and Manager.SessionConnectError signals must be used instead. CreateBluetoothSession now has additional source_address argument. Lots of reverse compatible API additions (mostly new functionality for BIP profile). See 0.4 API documentation for information how to use new API methods/signals.

org.openobex.Manager

Changed
  • object CreateBluetoothSession(string target_address, string source_address, string pattern)

CreateBluetoothSession method now has additional source_address argument for specifying Bluetooth adapter to be used for Session (use “00:00:00:00:00:00” for default adapter). Application needs to start listening to SessionConnected and SessionConnectError signals before calling this method.

Removed
  • void SessionRemoved(object path)

Use SessionClosed signal instead.

New
  • object CreateBluetoothImagingSession(string target_address, string source_addres, string bip_feature)
  • object CreateUsbSession(integer interface_number, string profile)
  • integer GetUsbInterfacesNum()
  • dict GetUsbInterfaceInfo(integer interface_number)
  • boolean CancelSessionConnect(object session_object)
  • array<string> GetSessionList()
  • array<string> GetServerList()
  • string GetVersion()
  • void SessionConnected(object path)

SessionConnected signal is emitted when Session is connected to target device.

  • void SessionConnectError(object path, string error_name, string error_message)

Emitted when Session connection fails. Session object must not be used after that.

  • void SessionClosed(object path)

Emitted when Session is closed and no longer valid.

org.openobex.Session

Removed
  • void Connect()

Connect method was removed because OBEX Connect is done automatically when underlying transport is connected.

  • void Connected()

Connected signal was removed because of race conditions it caused. Use SessionConnected and SessionConnectError signals from Manager object.

New
  • void CopyRemoteFileByType(string type, string local_path)
  • void SendFileExt(string local_path, string remote_filename, string type)
  • string GetImagingCapabilities()
  • void GetImageInfo(string local_path, out uint16 width, out uint16 height, out string encoding)
  • void PutImage(string local_path)
  • void PutImageResized(string local_path, uint16 width, uint16 height, string encoding, string transformation)
  • void PutLinkedAttachment(string image_handle, string local_path, string content_type, string charset)
  • void RemoteDisplaySelectImage(string image_handle)
  • void RemoteDisplayShowCurrentImage()
  • void RemoteDisplayShowNextImage()
  • void RemoteDisplayShowPreviousImage()
  • void ImageHandleReceived(string image_handle, boolean thumbnail_requested)

org.openobex.Server

New
  • void SetOption(string name, variant value)
  • array<string> GetServerSessionList()

org.openobex.ServerSession

New
  • void RemoteDisplayRequested(string filename)
obex-data-server/migrating_to_0.4.txt · Last modified: 2008/10/17 14:42 (external edit)