obexsrv - OBEX Server
*********************

A basic OBEX server implementation.

D-BUS control interface
=======================

Service:
        com.nokia.ObexServer

Object Paths:
        /com/nokia/ObexServer
        /com/nokia/ObexServer/Transfer/<xfer id>

Interfaces implemented by the OBEX server:
        com.nokia.ObexServer
        com.nokia.ObexServer.Transfer

Interfaces which registered handlers should implement:
        com.nokia.ObexServer.Handler


com.nokia.ObexServer
====================

The methods in this interface should be directed to the
/com/nokia/ObexServer object.

Method name: RegisterHandler
Parameters:
        1. string       Object path of handler
Return parameters: (none)
Errors:
        com.nokia.ObexServer.Error.Registered
                A handler is already registered
        com.nokia.ObexServer.Error.InvalidArguments
                Invalid call parameters were given.
Description:
        With this method you can register a handler for incoming requests.
        The server will deny all request if it does not have a handler
        registered.

        
Method name: UnregisterHandler
Parameters:
        1. string       Object path of handler
Return parameters: (none)
Errors:
        com.nokia.ObexServer.Error.NotRegistered
                The specified handler is not registered
        com.nokia.ObexServer.Error.InvalidArguments
                Invalid call parameters were given.
Description
        This method allows unregistering a handler which was registered
        using the RegisterHandler method.


com.nokia.ObexServer.Transfer
=============================

The methods in this interface should be directed to Transfer objects whose
paths can be discovered e.g. from the first parameter of the Authorize
method (see the com.nokia.ObexServer.Handler interface for more info).

Method name: Cancel
Parameters: (none)
Return parameters: (none)
Errors:
        com.nokia.ObexServer.Error.Forbidden
                Only the D-BUS name that called RegisterHandler is
		allowed to cancel a transfer.
        com.nokia.ObexServer.Error.NotFound
                No such transfer
Description:
        Use this method to cancel an ongoing transfer.


Signal name: Started
Parameters:
        1. boolean      Whether the transfer start succeeded or not
Description:
        This signal informs that a new transfer has started successfully
        (or that the start has failed if the parameter is FALSE). The signal
        is emmited from the Transfer specific object path (which you get as
        the first parameter of the Authorize method on the Handler interface).

Signal name: Completed
Parameters:
        1. boolean      Whether the transfer was completed successfully
Description:
        This signal informs that a transfer was completed successfully
        (or that the transfer failed if the parameter is FALSE). The signal
        is emmited from the Transfer specific object path (which you get as
        the first parameter of the Authorize method on the Handler interface).
        
Signal name: Progress
Parameters:
        1. int32      Bytes transfered so far
        2. int32      Final size of object (-1 if not known)
Description:
        This signal is emmited multiple during the transfer to inform that some
        progress has been made.


com.nokia.ObexServer.Handler
============================

This interface differs from the others in this document in that it is not
implemented by the server but by the handler that was registered using the
RegisterHandler method.

Method name: Authorize
Parameters:
        1. string       Object path of the about-to-start transfer
        2. string       Bluetooth address of the peer
        3. string       Name of object (empty string if not known)
        4. string       Type of object (empty string if not known)
        5. int32        Length of object in bytes (-1 if not known)
        6. int32        Last modification time of object (-1 if not known)
Return parameters
        1. string       File name (including path) where to store the object
Errors:
        com.nokia.ObexServer.Error.Refused
                The user refused to allow the transfer
        com.nokia.ObexServer.Error.InvalidArguments
                Invalid call parameters were given.
Description:
        The server uses this method to get authorization to start a transfer.
        Any reply which is not a method return with exactly one string
        argument is interpreted by the server as a refusal to start the
	transfer.


